diff options
author | Evan Prodromou <evan@status.net> | 2009-09-23 09:45:22 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-09-23 09:45:22 -0400 |
commit | 8284b3cb82f4dec6e0f2bf74dea6e1a3bc7f4eac (patch) | |
tree | 09b8c466df2476f9219550464eb73f6ecaa54e1c /classes/User.php | |
parent | 2cabfba767ba0d92d34a6ea4e4cf91c7325f3e95 (diff) | |
parent | bef4a8b6ba9e19f2ec629031444279ca76f17bcf (diff) |
Merge branch '0.8.x' into 0.9.x
Conflicts:
actions/requesttoken.php
classes/File.php
install.php
lib/noticeform.php
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 11cb4f08b..5e74c7fde 100644 --- a/classes/User.php +++ b/classes/User.php @@ -117,11 +117,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); } |