Index: trunk/phase3/includes/Setup.php |
— | — | @@ -204,14 +204,16 @@ |
205 | 205 | # Set default shared prefix |
206 | 206 | if( $wgSharedPrefix === false ) $wgSharedPrefix = $wgDBprefix; |
207 | 207 | |
208 | | -if ( in_array('user', $wgSharedTables) && $wgSharedDB && $wgSharedPrefix ) { |
209 | | - $wgCookiePrefix = $wgSharedDB . '_' . $wgSharedPrefix; |
210 | | -} elseif ( in_array('user', $wgSharedTables) && $wgSharedDB ) { |
211 | | - $wgCookiePrefix = $wgSharedDB; |
212 | | -} elseif ( $wgDBprefix ) { |
213 | | - $wgCookiePrefix = $wgDBname . '_' . $wgDBprefix; |
214 | | -} else { |
215 | | - $wgCookiePrefix = $wgDBname; |
| 208 | +if( !$wgCookiePrefix ) { |
| 209 | + if ( in_array('user', $wgSharedTables) && $wgSharedDB && $wgSharedPrefix ) { |
| 210 | + $wgCookiePrefix = $wgSharedDB . '_' . $wgSharedPrefix; |
| 211 | + } elseif ( in_array('user', $wgSharedTables) && $wgSharedDB ) { |
| 212 | + $wgCookiePrefix = $wgSharedDB; |
| 213 | + } elseif ( $wgDBprefix ) { |
| 214 | + $wgCookiePrefix = $wgDBname . '_' . $wgDBprefix; |
| 215 | + } else { |
| 216 | + $wgCookiePrefix = $wgDBname; |
| 217 | + } |
216 | 218 | } |
217 | 219 | $wgCookiePrefix = strtr($wgCookiePrefix, "=,; +.\"'\\[", "__________"); |
218 | 220 | |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1528,6 +1528,12 @@ |
1529 | 1529 | $wgDisableCookieCheck = false; |
1530 | 1530 | |
1531 | 1531 | /** |
| 1532 | + * Set $wgCookiePrefix to use a custom one. Setting to false sets the default of |
| 1533 | + * using the database name. |
| 1534 | + */ |
| 1535 | +$wgCookiePrefix = false; |
| 1536 | + |
| 1537 | +/** |
1532 | 1538 | * Set authentication cookies to HttpOnly to prevent access by JavaScript, |
1533 | 1539 | * in browsers that support this feature. This can mitigates some classes of |
1534 | 1540 | * XSS attack. |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -68,6 +68,8 @@ |
69 | 69 | with MimeMagic. |
70 | 70 | * Added $wgDirectoryMode, which allows for setting the default CHMOD value when |
71 | 71 | creating new directories. |
| 72 | +* (bug 14843) $wgCookiePrefix can be set by LocalSettings now, false defaults |
| 73 | + current behavior. |
72 | 74 | |
73 | 75 | === New features in 1.13 === |
74 | 76 | |