@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Weaken the guidance recommending that installs enable "STRICT_ALL_TABLES"

Summary: Ref T13404. Enabling "STRICT_ALL_TABLES" is good, but if you don't want to bother it doesn't matter too much. All upstream development has been on "STRICT_ALL_TABLES" for a long time.

Test Plan: {F6847839}

Maniphest Tasks: T13404

Differential Revision: https://secure.phabricator.com/D20790

+37 -20
+37 -20
src/applications/config/check/PhabricatorMySQLSetupCheck.php
··· 50 50 if (!in_array('STRICT_ALL_TABLES', $modes)) { 51 51 $summary = pht( 52 52 'MySQL is not in strict mode (on host "%s"), but using strict mode '. 53 - 'is strongly encouraged.', 53 + 'is recommended.', 54 54 $host_name); 55 55 56 56 $message = pht( 57 - "On database host \"%s\", the global %s is not set to %s. ". 58 - "It is strongly encouraged that you enable this mode when running ". 59 - "Phabricator.\n\n". 60 - "By default MySQL will silently ignore some types of errors, which ". 61 - "can cause data loss and raise security concerns. Enabling strict ". 62 - "mode makes MySQL raise an explicit error instead, and prevents this ". 63 - "entire class of problems from doing any damage.\n\n". 64 - "You can find more information about this mode (and how to configure ". 65 - "it) in the MySQL manual. Usually, it is sufficient to add this to ". 66 - "your %s file (in the %s section) and then restart %s:\n\n". 67 - "%s\n". 68 - "(Note that if you run other applications against the same database, ". 69 - "they may not work in strict mode. Be careful about enabling it in ". 70 - "these cases.)", 57 + 'On database host "%s", the global "sql_mode" setting does not '. 58 + 'include the "STRICT_ALL_TABLES" mode. Enabling this mode is '. 59 + 'recommended to generally improve how MySQL handles certain errors.'. 60 + "\n\n". 61 + 'Without this mode enabled, MySQL will silently ignore some error '. 62 + 'conditions, including inserts which attempt to store more data in '. 63 + 'a column than actually fits. This behavior is usually undesirable '. 64 + 'and can lead to data corruption (by truncating multibyte characters '. 65 + 'in the middle), data loss (by discarding the data which does not '. 66 + 'fit into the column), or security concerns (for example, by '. 67 + 'truncating keys or credentials).'. 68 + "\n\n". 69 + 'Phabricator is developed and tested in "STRICT_ALL_TABLES" mode so '. 70 + 'you should normally never encounter these situations, but may run '. 71 + 'into them if you interact with the database directly, run '. 72 + 'third-party code, develop extensions, or just encounter a bug in '. 73 + 'the software.'. 74 + "\n\n". 75 + 'Enabling "STRICT_ALL_TABLES" makes MySQL raise an explicit error '. 76 + 'if one of these unusual situations does occur. This is a safer '. 77 + 'behavior and prevents these situations from causing secret, subtle, '. 78 + 'and potentially serious issues later on.'. 79 + "\n\n". 80 + 'You can find more information about this mode (and how to configure '. 81 + 'it) in the MySQL manual. Usually, it is sufficient to add this to '. 82 + 'your "my.cnf" file (in the "[mysqld]" section) and then '. 83 + 'restart "mysqld":'. 84 + "\n\n". 85 + '%s'. 86 + "\n". 87 + 'Note that if you run other applications against the same database, '. 88 + 'they may not work in strict mode.'. 89 + "\n\n". 90 + 'If you can not or do not want to enable "STRICT_ALL_TABLES", you '. 91 + 'can safely ignore this warning. Phabricator will work correctly '. 92 + 'with this mode enabled or disabled.', 71 93 $host_name, 72 - phutil_tag('tt', array(), 'sql_mode'), 73 - phutil_tag('tt', array(), 'STRICT_ALL_TABLES'), 74 - phutil_tag('tt', array(), 'my.cnf'), 75 - phutil_tag('tt', array(), '[mysqld]'), 76 - phutil_tag('tt', array(), 'mysqld'), 77 94 phutil_tag('pre', array(), 'sql_mode=STRICT_ALL_TABLES')); 78 95 79 96 $this->newIssue('mysql.mode')