mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-04-23 19:21:04 +08:00
限制用户名注册
This commit is contained in:
@@ -6,11 +6,13 @@
|
||||
apt-get update
|
||||
apt-get upgrade
|
||||
|
||||
|
||||
apt-get install nodejs git mongodb memcached nginx postfix
|
||||
apt-get install python g++ make screen git wget zip unzip iftop unrar-free axel vim emacs subversion subversion-tools curl tmux mercurial
|
||||
apt-get install ntp quota quotatool
|
||||
|
||||
vi /etc/hostname
|
||||
vi /etc/hosts
|
||||
|
||||
adduser rpadmin
|
||||
usermod -G rpadmin -a www-data
|
||||
su rpadmin
|
||||
|
||||
@@ -22,6 +22,9 @@ module.exports =
|
||||
unless req.body.passwd or not /^.+$/.test req.body.passwd
|
||||
return res.json 400, error: 'invalid_passwd'
|
||||
|
||||
if req.body.username in config.account.invalid_username
|
||||
return res.json 400, error: 'username_exist'
|
||||
|
||||
mAccount.byUsername req.body.username, (account) ->
|
||||
if account
|
||||
return res.json 400, error: 'username_exist'
|
||||
|
||||
@@ -6,6 +6,11 @@ module.exports =
|
||||
username: ['jysperm']
|
||||
|
||||
account:
|
||||
invalid_username: [
|
||||
'root', 'daemon', 'bin', 'sys', 'sync', 'games', 'man', 'lp', 'mail', 'colord', 'nobody',
|
||||
'news', 'uucp', 'proxy', 'www-data', 'backup', 'list', 'irc', 'gnats', 'messagebus',
|
||||
'syslog', 'sshd', 'ntp', 'memcache', 'mongodb', 'rpadmin', 'postfix', 'libuuid'
|
||||
]
|
||||
cookie_time: 30 * 24 * 3600 * 1000
|
||||
|
||||
i18n:
|
||||
|
||||
Reference in New Issue
Block a user