Skip to content

Commit

Permalink
Merge pull request #913 from catalyst/fix-sql-format-405
Browse files Browse the repository at this point in the history
[#911] fix sql cleaning
  • Loading branch information
Peterburnett authored Dec 9, 2024
2 parents 9034f9c + fc05b1f commit c61b76b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion classes/local/step/reader_sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ class reader_sql extends reader_step {
*/
public static function form_define_fields(): array {
return [
'sql' => ['type' => PARAM_TEXT, 'required' => true],
// Must be PARAM_RAW to avoid clean_param mangling the sql.
'sql' => ['type' => PARAM_RAW, 'required' => true],
'counterfield' => ['type' => PARAM_TEXT],
'countervalue' => ['type' => PARAM_TEXT],
];
Expand Down
3 changes: 2 additions & 1 deletion classes/local/step/sql_trait.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ public function validate_config($config) {
*/
public static function form_define_fields(): array {
return [
'sql' => ['type' => PARAM_TEXT, 'required' => true],
// Must be PARAM_RAW to avoid clean_param mangling the sql.
'sql' => ['type' => PARAM_RAW, 'required' => true],
];
}

Expand Down

0 comments on commit c61b76b

Please sign in to comment.