File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,15 @@ public function validationProvider()
24
24
['ant44lion ' , true ],
25
25
['44 ' , true ],
26
26
27
+ ['aNt ' , false ],
28
+ ['anT.Lion ' , false ],
29
+ ['ant.Lion.cow ' , false ],
30
+ ['ant-Lion ' , false ],
31
+ ['ant-Lion.cow ' , false ],
32
+ ['4aNt ' , false ],
33
+ ['aNt4 ' , false ],
34
+ ['ant44Lion ' , false ],
35
+
27
36
['ant. ' , false ],
28
37
['.ant ' , false ],
29
38
['ant- ' , false ],
Original file line number Diff line number Diff line change 3
3
use chrisbliss18 \phpico \PHPIco ;
4
4
use dokuwiki \Extension \AdminPlugin ;
5
5
use dokuwiki \Form \Form ;
6
+ use dokuwiki \Utf8 \PhpString ;
6
7
use splitbrain \RingIcon \RingIcon ;
7
8
8
9
/**
@@ -139,7 +140,7 @@ protected function validateAnimalData()
139
140
{
140
141
global $ INPUT ;
141
142
142
- $ animalname = $ INPUT ->filter ('trim ' )->str ('animalname ' );
143
+ $ animalname = $ INPUT ->filter ('trim ' )->filter ([PhpString::class, ' strtolower ' ])-> str ('animalname ' );
143
144
$ adminsetup = $ INPUT ->str ('adminsetup ' );
144
145
$ adminpass = $ INPUT ->filter ('trim ' )->str ('adminPassword ' );
145
146
$ template = $ INPUT ->filter ('trim ' )->str ('animaltemplate ' );
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ public function checkFarmSetup()
130
130
*/
131
131
public function validateAnimalName ($ animalname )
132
132
{
133
- return preg_match ("/^[a-z0-9]+([ \\. \\-][a-z0-9]+)*$/i " , $ animalname ) === 1 ;
133
+ return preg_match ("/^[a-z0-9]+([ \\. \\-][a-z0-9]+)*$/ " , $ animalname ) === 1 ;
134
134
}
135
135
136
136
/**
You can’t perform that action at this time.
0 commit comments