Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PDO: Move online schema creation behind feature flag
The XHGui install at Wikimedia Foundation is deployed with database credentials that permit read-write operations (SELECT, INSERT) but as safety precaution do not permit admin actions like CREATE from individual web requests. In addition to not allowing admin actions, our install also disallows DELETE queries, given that the install is exposed to the public Internet (ref perftools#248) and further disables POST requests (so that those features serve HTTP 40x instead of a db query error with HTTP 50x). Since XHGui version 0.16.0, with perftools#355, the lazy-creation for tables was moved from the Saver code (which is not used when browsing XHGui) to to Repo code, and thus resulted in the application serving HTTP 500 on all requests, unless the `CREATE TABLE` query is permitted on all web requests. Fix this by making this method call feature flagged in a way that can be disabled using XHGUI_PDO_INITSCHEMA=false. Change-Id: I681d500fd393a47471a475b705c67280b39ab7ce
- Loading branch information