{"push_id":1570008868,"size":2,"distinct_size":2,"ref":"refs/heads/13","head":"f29ea24d9f1d5771f7a5fe2f0bae51c4bf9a657a","before":"557ef67690e57b11b8d99f9c7cfa67376890dd49","commits":[{"sha":"2cd75fe31185a3191c9555969fb6281357129b63","author":{"name":"Sean Bright","email":"d429fd31e5045266c5cdac505e468717f3ae0113@gmail.com"},"message":"realtime: Fix LIKE escaping in SQL backends\n\nThe realtime framework allows for components to look up values using a\nLIKE clause with similar syntax to SQL's. pbx_realtime uses this\nfunctionality to search for pattern matching extensions that start with\nan underscore (_).\n\nWhen passing an underscore to SQL's LIKE clause, it will be interpreted\nas a wildcard matching a single character and therefore needs to be\nescaped. It is (for better or for worse) the responsibility of the\ncomponent that is querying realtime to escape it with a backslash before\npassing it in. Some RDBMs support escape characters by default, but the\nSQL92 standard explicitly says that there are no escape characters\nunless they are specified with an ESCAPE clause, e.g.\n\n\tSELECT * FROM table WHERE column LIKE '\\_%' ESCAPE '\\'\n\nThis patch instructs 3 backends - res_config_mysql, res_config_pgsql,\nand res_config_sqlite3 - to use the ESCAPE clause where appropriate.\n\nLooking through documentation and source tarballs, I was able to\ndetermine that the ESCAPE clause is supported in:\n\nMySQL 5.0.15   (released 2005-10-22 - earliest version available from\n                archives)\nPostgreSQL 7.1 (released 2001-04-13)\nSQLite 3.1.0   (released 2005-01-21)\n\nThe versions of the relevant libraries that we depend on to access MySQL\nand PostgreSQL will not work on versions that old, and I've added an\nexplicit check in res_config_sqlite3 to only use the ESCAPE clause when\nwe have a sufficiently new version of SQLite3.\n\nres_config_odbc already handles the escape characters appropriately, so\nno changes were required there.\n\nASTERISK-15858 #close\nReported by: Humberto Figuera\n\nASTERISK-26057 #close\nReported by: Stepan\n\nChange-Id: I93117fbb874189ae819f4a31222df7c82cd20efa","distinct":true,"url":"https://api.github.com/repos/asterisk/asterisk/commits/2cd75fe31185a3191c9555969fb6281357129b63"},{"sha":"f29ea24d9f1d5771f7a5fe2f0bae51c4bf9a657a","author":{"name":"zuul","email":"b5147e09c50e2df98187d616e488bd7083ad47b4@gerrit.asterisk.org"},"message":"Merge \"realtime: Fix LIKE escaping in SQL backends\" into 13","distinct":true,"url":"https://api.github.com/repos/asterisk/asterisk/commits/f29ea24d9f1d5771f7a5fe2f0bae51c4bf9a657a"}]}
{"actor":{"display_login":"asteriskteam"}}