Skip to content

Commit 8ef3a84

Browse files
committed
Revert changes to VIP minimum ruleset and tests
1 parent b68c451 commit 8ef3a84

File tree

4 files changed

+30
-33
lines changed

4 files changed

+30
-33
lines changed

WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ public function getErrorList() {
8787
174 => 1,
8888
175 => 1,
8989
177 => 1,
90-
180 => 1,
9190
182 => 1,
9291
183 => 1,
9392
184 => 1,

WordPressVIPMinimum/ruleset-test.inc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -365,24 +365,24 @@ session_status(); // Error.
365365
session_unregister(); // Error.
366366
session_unset(); // Error.
367367
session_write_close(); // Error.
368-
delete(); // Warning.
369-
file_put_contents( $file, $text, FILE_APPEND ); // Warning.
368+
delete(); // Error.
369+
file_put_contents( $file, $text, FILE_APPEND ); // Error.
370370
while ( $count > $loop ) {
371-
if ( flock( $fp, LOCK_EX ) ) { // Warning.
372-
fwrite( $fp, $text ); // Warning.
371+
if ( flock( $fp, LOCK_EX ) ) { // Error.
372+
fwrite( $fp, $text ); // Error.
373373
}
374374
}
375-
fputcsv(); // Warning.
376-
fputs(); // Warning.
377-
ftruncate(); // Warning.
378-
is_writable(); // Warning.
379-
is_writeable(); // Warning.
380-
link(); // Warning.
381-
rename(); // Warning.
382-
symlink(); // Warning.
383-
tempnam(); // Warning.
384-
touch(); // Warning.
385-
unlink(); // Warning.
375+
fputcsv(); // Error.
376+
fputs(); // Error.
377+
ftruncate(); // Error.
378+
is_writable(); // Error.
379+
is_writeable(); // Error.
380+
link(); // Error.
381+
rename(); // Error.
382+
symlink(); // Error.
383+
tempnam(); // Error.
384+
touch(); // Error.
385+
unlink(); // Error.
386386
mkdir(); // Error.
387387
rmdir(); // Error.
388388
chgrp(); // Error.

WordPressVIPMinimum/ruleset-test.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,21 @@
139139
365 => 1,
140140
366 => 1,
141141
367 => 1,
142+
368 => 1,
143+
369 => 1,
144+
371 => 1,
145+
372 => 1,
146+
375 => 1,
147+
376 => 1,
148+
377 => 1,
149+
378 => 1,
150+
379 => 1,
151+
380 => 1,
152+
381 => 1,
153+
382 => 1,
154+
383 => 1,
155+
384 => 1,
156+
385 => 1,
142157
386 => 1,
143158
387 => 1,
144159
388 => 1,
@@ -247,21 +262,6 @@
247262
288 => 1,
248263
293 => 1,
249264
294 => 1,
250-
368 => 1,
251-
369 => 1,
252-
371 => 1,
253-
372 => 1,
254-
375 => 1,
255-
376 => 1,
256-
377 => 1,
257-
378 => 1,
258-
379 => 1,
259-
380 => 1,
260-
381 => 1,
261-
382 => 1,
262-
383 => 1,
263-
384 => 1,
264-
385 => 1,
265265
396 => 1,
266266
397 => 1,
267267
398 => 1,

WordPressVIPMinimum/ruleset.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@
136136
<!-- This is already covered in WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_fwrite -->
137137
<exclude name="WordPress.WP.AlternativeFunctions.file_system_read_fwrite"/>
138138
<!-- This is already covered in WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_fwrite -->
139-
<exclude name="WordPress.WP.AlternativeFunctions.file_system_read_fclose"/>
140-
<!-- This is already covered in WordPressVIPMinimum.Functions.RestrictedFunctions.file_ops_fwrite -->
141139
<exclude name="WordPress.WP.AlternativeFunctions.file_system_read_file_put_contents"/>
142140
</rule>
143141
<!-- VIP recommends other functions -->

0 commit comments

Comments
 (0)