-
Notifications
You must be signed in to change notification settings - Fork 0
Tests/playing gh users 2 #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,3 +21,4 @@ node_modules/ | |
| *.log | ||
| *.sql | ||
| *.sqlite | ||
| .idea | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <?php | ||
|
|
||
|
|
||
| class MyProblematicClass | ||
| { | ||
| protected string $test; | ||
|
|
||
| public function test(): string | ||
| { | ||
| foreach ($_POST['menu-locations'] as $menu_id) { | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 Error: Processing form data without nonce verification (WordPress.Security.NonceVerification.Missing).
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 Error: Detected usage of a possibly undefined superglobal array index: $_POST['menu-locations']. Use isset() or empty() to check the index exists before using it (WordPress.Security.ValidatedSanitizedInput.InputNotValidated).
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| echo 'ADD warning severity 10 - non-sanitized input variable'; | ||
| } | ||
| $functionsCookies = $_COOKIE; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 Error: Due to server-side caching, server-side based client related logic might not work. We recommend implementing client side logic in JavaScript instead (WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE). |
||
|
|
||
| $functionsPost = $_POST; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 Error: Processing form data without nonce verification (WordPress.Security.NonceVerification.Missing). |
||
|
|
||
| var_dump($functionsPost ); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| session_write_close(); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 Error: The use of PHP session function session_write_close() is prohibited (WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_write_close). |
||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <?php | ||
|
|
||
|
|
||
| class MySecondProblematicClass | ||
| { | ||
| protected string $test; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 Error: PHP syntax error: syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) (Generic.PHP.Syntax.PHPSyntax). |
||
|
|
||
| public function test(): string | ||
| { | ||
| foreach ($_POST['menu-locations'] as $menu_id) { | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 Error: Processing form data without nonce verification (WordPress.Security.NonceVerification.Missing).
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 Error: Detected usage of a possibly undefined superglobal array index: $_POST['menu-locations']. Use isset() or empty() to check the index exists before using it (WordPress.Security.ValidatedSanitizedInput.InputNotValidated).
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| echo 'ADD warning severity 10 - non-sanitized input variable'; | ||
| } | ||
| $functionsCookies = $_COOKIE; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 Error: Due to server-side caching, server-side based client related logic might not work. We recommend implementing client side logic in JavaScript instead (WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE). |
||
|
|
||
| $functionsPost = $_POST; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 Error: Processing form data without nonce verification (WordPress.Security.NonceVerification.Missing). |
||
|
|
||
| var_dump($functionsPost ); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| session_write_close(); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 Error: The use of PHP session function session_write_close() is prohibited (WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_write_close). |
||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <?php | ||
|
|
||
|
|
||
| class Problem1Class | ||
| { | ||
| protected string $test; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 Error: PHP syntax error: syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) (Generic.PHP.Syntax.PHPSyntax). |
||
|
|
||
| public function test(): string | ||
| { | ||
| $functionsCookies = $_COOKIE; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 Error: Due to server-side caching, server-side based client related logic might not work. We recommend implementing client side logic in JavaScript instead (WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE). |
||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <?php | ||
|
|
||
|
|
||
| class Problem2Class | ||
| { | ||
|
|
||
| public function test(): string | ||
| { | ||
| foreach ($_POST['menu-locations'] as $menu_id) { | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 Error: Processing form data without nonce verification (WordPress.Security.NonceVerification.Missing).
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 Error: Detected usage of a possibly undefined superglobal array index: $_POST['menu-locations']. Use isset() or empty() to check the index exists before using it (WordPress.Security.ValidatedSanitizedInput.InputNotValidated).
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| echo 'ADD warning severity 10 - non-sanitized input variable'; | ||
| } | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: PHP syntax error: syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) (Generic.PHP.Syntax.PHPSyntax).