Skip to content

Conversation

@MarcinNowakWebdeveloper
Copy link
Contributor

@MarcinNowakWebdeveloper MarcinNowakWebdeveloper commented Apr 20, 2022

Description (*)

The most common used delimiters in PHP are /@#~,
which are not escaped by default
(by default preg_quote escapes .+*?[^]$(){}=!<>|:-).

This avoids hard to detect issues when the content passed to regex contains char being used as a delimiter.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@github-actions github-actions bot added Component: Api2 Relates to Mage_Api2 Component: Catalog Relates to Mage_Catalog Component: Core Relates to Mage_Core Component: Dataflow Relates to Mage_Dataflow Component: lib/Zend Component: lib/* Relates to lib/* labels Apr 20, 2022
@MarcinNowakWebdeveloper MarcinNowakWebdeveloper force-pushed the pass_delimiter_char_to_preg_quote branch from 5bf2aa9 to 3869cc4 Compare April 20, 2022 13:52
The most common used delimiters in PHP are /@#~,
which are not escaped by default
(by default preg_quote escapes .\+*?[^]$(){}=!<>|:-).
@tmotyl tmotyl force-pushed the pass_delimiter_char_to_preg_quote branch from 3869cc4 to 9c980b1 Compare April 28, 2022 13:31
@tmotyl
Copy link
Contributor

tmotyl commented Apr 28, 2022

rebased

@fballiano fballiano merged commit fb65022 into OpenMage:1.9.4.x Jun 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2022

Unit Test Results

1 files  ±0  1 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
7 runs  ±0  5 ✔️ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit fb65022. ± Comparison against base commit c85fdef.

@sreichel
Copy link
Contributor

sreichel commented Dec 22, 2022

Change made to lib/Zend/Db/Statement.php does nothing?

This files is overridden by app/code/core/Zend/Db/Statement.php (that should be reviewed at all)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Api2 Relates to Mage_Api2 Component: Catalog Relates to Mage_Catalog Component: Core Relates to Mage_Core Component: Dataflow Relates to Mage_Dataflow Component: lib/* Relates to lib/*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants