dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SECURITY: Make 'newbie' limit in $wgRateLimits really override 'user' limit
[lhc/web/wiklou.git]
/
includes
/
user
/
User.php
diff --git
a/includes/user/User.php
b/includes/user/User.php
index
3e6b212
..
aa21184
100644
(file)
--- a/
includes/user/User.php
+++ b/
includes/user/User.php
@@
-2108,10
+2108,6
@@
class User implements IDBAccessObject, UserIdentity {
if ( isset( $limits['user'] ) ) {
$userLimit = $limits['user'];
}
if ( isset( $limits['user'] ) ) {
$userLimit = $limits['user'];
}
- // limits for newbie logged-in users
- if ( $isNewbie && isset( $limits['newbie'] ) ) {
- $keys[$cache->makeKey( 'limiter', $action, 'user', $id )] = $limits['newbie'];
- }
}
// limits for anons and for newbie logged-in users
}
// limits for anons and for newbie logged-in users
@@
-2143,6
+2139,11
@@
class User implements IDBAccessObject, UserIdentity {
}
}
}
}
+ // limits for newbie logged-in users (override all the normal user limits)
+ if ( $id !== 0 && $isNewbie && isset( $limits['newbie'] ) ) {
+ $userLimit = $limits['newbie'];
+ }
+
// Set the user limit key
if ( $userLimit !== false ) {
list( $max, $period ) = $userLimit;
// Set the user limit key
if ( $userLimit !== false ) {
list( $max, $period ) = $userLimit;
@@
-3084,7
+3085,7
@@
class User implements IDBAccessObject, UserIdentity {
* Get the user's current setting for a given option.
*
* @param string $oname The option to check
* Get the user's current setting for a given option.
*
* @param string $oname The option to check
- * @param string $defaultOverride A default value returned if the option does not exist
+ * @param string
|array
$defaultOverride A default value returned if the option does not exist
* @param bool $ignoreHidden Whether to ignore the effects of $wgHiddenPrefs
* @return string|array|int|null User's current value for the option
* @see getBoolOption()
* @param bool $ignoreHidden Whether to ignore the effects of $wgHiddenPrefs
* @return string|array|int|null User's current value for the option
* @see getBoolOption()