Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #87 from Sephster/fix-sql-injection-attack
Security Fix
- Loading branch information
Showing
175 changed files
with
14,418 additions
and
13,168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| APP_WWW=http://localhost | ||
| DOC_ROOT=/var/www/webpa/ | ||
| DB_HOST=localhost | ||
| DB_USER=root | ||
| DB_PASS=password | ||
| DB_NAME=webpa | ||
| DB_PREFIX=pa2_ | ||
| CUSTOM_CSS_PATH= | ||
| SESSION_NAME=WEBPA | ||
| ACADEMIC_YEAR_START_MONTH=9 | ||
| HELP_EMAIL=someone@email.com | ||
| NO_REPLY_EMAIL=no-reply@email.com | ||
| LOGO_PATH=/images/logo.png | ||
| LOGO_ALT_TEXT="Your institution name" | ||
| LOGO_HEIGHT=25 | ||
| LOGO_WIDTH=102 | ||
| ALLOW_TEXT_INPUT=true | ||
| ENABLE_USER_DELETE=true | ||
| ENABLE_MODULE_DELETE=true | ||
| SMTP_HOST=localhost | ||
| SMTP_PORT=25 | ||
| EMAIL_ADDRESS=someone@email.com | ||
| ENABLE_MOODLE_GRADEBOOK=false | ||
| SEND_OPENING_REMINDER=false | ||
| SEND_CLOSING_REMINDER=false | ||
| MARK_TERMINOLOGY=Scores(s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,5 @@ vendor/ | |
| /composer.lock | ||
| .idea/ | ||
| *.orig | ||
| .env | ||
| /src/mod/** | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| <?php | ||
|
|
||
| $finder = PhpCsFixer\Finder::create() | ||
| ->exclude('mod') | ||
| ->in(__DIR__ . '/src'); | ||
|
|
||
| $config = new PhpCsFixer\Config(); | ||
|
|
||
| return $config | ||
| ->setRules([ | ||
| '@PSR2' => true, | ||
| '@PHP74Migration' => true, | ||
| 'array_syntax' => ['syntax' => 'short'], | ||
| 'no_alias_language_construct_call' => true, | ||
| 'no_mixed_echo_print' => true, | ||
| 'no_multiline_whitespace_around_double_arrow' => true, | ||
| 'no_trailing_comma_in_singleline_array' => true, | ||
| 'no_whitespace_before_comma_in_array' => true, | ||
| 'normalize_index_brace' => true, | ||
| 'trailing_comma_in_multiline_array' => true, | ||
| 'trim_array_spaces' => true, | ||
| 'whitespace_after_comma_in_array' => true, | ||
| 'lowercase_static_reference' => true, | ||
| 'magic_constant_casing' => true, | ||
| 'magic_method_casing' => true, | ||
| 'native_function_casing' => true, | ||
| 'native_function_type_declaration_casing' => true, | ||
| 'cast_spaces' => true, | ||
| 'lowercase_cast' => true, | ||
| 'no_short_bool_cast' => true, | ||
| 'no_unset_cast' => true, | ||
| 'short_scalar_cast' => true, | ||
| 'class_attributes_separation' => true, | ||
| 'class_definition' => true, | ||
| 'no_blank_lines_after_class_opening' => true, | ||
| 'no_null_property_initialization' => true, | ||
| 'protected_to_private' => true, | ||
| 'self_static_accessor' => true, | ||
| 'single_class_element_per_statement' => true, | ||
| 'single_trait_insert_per_statement' => true, | ||
| 'multiline_comment_opening_closing' => true, | ||
| 'no_empty_comment' => true, | ||
| 'single_line_comment_style' => true, | ||
| 'include' => true, | ||
| 'no_alternative_syntax' => true, | ||
| 'no_superfluous_elseif' => true, | ||
| 'no_trailing_comma_in_list_call' => true, | ||
| 'no_unneeded_control_parentheses' => true, | ||
| 'no_unneeded_curly_braces' => true, | ||
| 'no_useless_else' => true, | ||
| 'simplified_if_return' => true, | ||
| 'switch_case_space' => true, | ||
| 'switch_continue_to_break' => true, | ||
| 'function_typehint_space' => true, | ||
| 'method_argument_space' => true, | ||
| 'nullable_type_declaration_for_default_null_value' => true, | ||
| 'return_type_declaration' => true, | ||
| 'fully_qualified_strict_types' => true, | ||
| 'global_namespace_import' => true, | ||
| 'no_leading_import_slash' => true, | ||
| 'no_unused_imports' => true, | ||
| 'ordered_imports' => true, | ||
| 'single_quote' => true, | ||
| ]) | ||
| ->setFinder($finder); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| <?xml version="1.0"?> | ||
| <ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd"> | ||
| <description>WebPA Coding Standards</description> | ||
|
|
||
| <file>src</file> | ||
|
|
||
| <exclude-pattern>*/src/*\.(inc|css|js)$</exclude-pattern> | ||
|
|
||
| <arg name="basepath" value="."/> | ||
| <arg name="colors"/> | ||
| <arg name="parallel" value="75"/> | ||
| <arg value="np"/> | ||
|
|
||
| <!-- Don't hide tokenizer exceptions --> | ||
| <rule ref="Internal.Tokenizer.Exception"> | ||
| <type>error</type> | ||
| </rule> | ||
|
|
||
| <!-- Include the whole PEAR standard --> | ||
| <rule ref="PSR2" /> | ||
|
|
||
| <!-- Check var names, but we don't want leading underscores for private vars --> | ||
| <rule ref="Squiz.NamingConventions.ValidVariableName"/> | ||
| <rule ref="Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore"> | ||
| <severity>0</severity> | ||
| </rule> | ||
|
|
||
| <!-- Private methods MUST not be prefixed with an underscore --> | ||
| <rule ref="PSR2.Methods.MethodDeclaration.Underscore"> | ||
| <type>error</type> | ||
| </rule> | ||
|
|
||
| <!-- Private properties MUST not be prefixed with an underscore --> | ||
| <rule ref="PSR2.Classes.PropertyDeclaration.Underscore"> | ||
| <type>error</type> | ||
| </rule> | ||
|
|
||
| <!-- Side effects should be classed as an error because these break PHPStan checks --> | ||
| <rule ref="PSR1.Files.SideEffects"> | ||
| <type>error</type> | ||
| </rule> | ||
| </ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| parameters: | ||
| level: 0 | ||
| paths: | ||
| - src | ||
| excludePaths: | ||
| - src/mod/* |
Oops, something went wrong.