File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed
Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ root
2+ daemon
3+ bin
4+ sys
5+ sync
6+ games
7+ man
8+ lp
9+ mail
10+ news
11+ uucp
12+ proxy
13+ www-data
14+ wwwrun
15+ apache
16+ backup
17+ list
18+ irc
19+ gnats
20+ nobody
21+ Debian-exim
22+ statd
23+ identd
24+ sshd
25+ mysql
26+ postgres
27+ postfix
28+ clamav
29+ amavis
30+ vmail
31+ getmail
32+ ispconfig
33+ courier
34+ dovecot
Original file line number Diff line number Diff line change @@ -72,6 +72,17 @@ function onShowNew() {
7272 parent ::onShowNew ();
7373 }
7474
75+ function onBeforeInsert () {
76+ global $ app , $ conf ;
77+
78+ // check if the username is not blacklisted
79+ $ blacklist = file (ISPC_LIB_PATH .'/shelluser_blacklist ' );
80+ foreach ($ blacklist as $ line ) {
81+ if (strtolower (trim ($ line )) == strtolower (trim ($ this ->dataRecord ['username ' ]))) $ app ->tform ->errorMessage .= 'The username is not allowed. ' ;
82+ }
83+ unset($ blacklist );
84+ }
85+
7586 function onAfterInsert () {
7687 global $ app , $ conf ;
7788
@@ -86,6 +97,17 @@ function onAfterInsert() {
8697
8798 }
8899
100+ function onBeforeUpdate () {
101+ global $ app , $ conf ;
102+
103+ // check if the username is not blacklisted
104+ $ blacklist = file (ISPC_LIB_PATH .'/shelluser_blacklist ' );
105+ foreach ($ blacklist as $ line ) {
106+ if (strtolower (trim ($ line )) == strtolower (trim ($ this ->dataRecord ['username ' ]))) $ app ->tform ->errorMessage .= 'The username is not allowed. ' ;
107+ }
108+ unset($ blacklist );
109+ }
110+
89111 function onAfterUpdate () {
90112 global $ app , $ conf ;
91113
You can’t perform that action at this time.
0 commit comments