mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 05:12:41 +01:00
Don't flag "EXPLAIN" as a write
Summary: These queries are safe to run without a CSRF token, and we need them for the query analyzer in DarkConsole. Test Plan: "Analyze Query Plans" works again. Reviewers: jungejason, nh, tuomaspelkonen, aran Reviewed By: nh CC: aran, epriestley, nh Differential Revision: 895
This commit is contained in:
parent
ae045a9cf2
commit
628082d427
1 changed files with 1 additions and 1 deletions
|
@ -209,7 +209,7 @@ class AphrontMySQLDatabaseConnection extends AphrontDatabaseConnection {
|
||||||
$this->requireConnection();
|
$this->requireConnection();
|
||||||
|
|
||||||
// TODO: Do we need to include transactional statements here?
|
// TODO: Do we need to include transactional statements here?
|
||||||
$is_write = !preg_match('/^(SELECT|SHOW)\s/', $raw_query);
|
$is_write = !preg_match('/^(SELECT|SHOW|EXPLAIN)\s/', $raw_query);
|
||||||
if ($is_write) {
|
if ($is_write) {
|
||||||
AphrontWriteGuard::willWrite();
|
AphrontWriteGuard::willWrite();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue