diff options
author | Evan Prodromou <evan@status.net> | 2009-09-23 09:29:02 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-09-23 09:29:02 -0400 |
commit | c01a5b8f2e37fe876507edfccc01126a117d9728 (patch) | |
tree | 93090403212c52e75a717730791917b1cc6f8fa0 /classes/User.php | |
parent | e80fad7ad9bd0bee6a9cf4cfd1615a9b07277364 (diff) | |
parent | acd5a53257f6d0677d1630e4f6cae80706cdbdba (diff) |
Merge branch '0.8.x' of git@gitorious.org:statusnet/mainline into 0.8.x
Diffstat (limited to 'classes/User.php')
-rw-r--r-- | classes/User.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/classes/User.php b/classes/User.php index 14d3cf54f..8386f1e18 100644 --- a/classes/User.php +++ b/classes/User.php @@ -120,11 +120,15 @@ class User extends Memcached_DataObject function allowed_nickname($nickname) { // XXX: should already be validated for size, content, etc. - static $blacklist = array('rss', 'xrds', 'doc', 'main', - 'settings', 'notice', 'user', - 'search', 'avatar', 'tag', 'tags', - 'api', 'message', 'group', 'groups', - 'local'); + + $blacklist = array(); + + //all directory and file names should be blacklisted + $d = dir(INSTALLDIR); + while (false !== ($entry = $d->read())) { + $blacklist[]=$entry; + } + $d->close(); $merged = array_merge($blacklist, common_config('nickname', 'blacklist')); return !in_array($nickname, $merged); } |