-
Notifications
You must be signed in to change notification settings - Fork 241
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
EZP-26276: Exclamation mark followed by non-chars at end of URL does not work in emails #1260
Conversation
ping @glye it looks like this one came back from the dead to eat your brain 😄 |
@gabrielfin Thanks. Which version(s) does this affect? Note that we need a different approach to make this complete. The PR as is fixes the case of And this fix in |
FYI I made a new issue, and updated the title/description. |
This issue affects, at least, master and 4.2.0. But I guess it actually affects every legacy version since the original patch (EZP-14719). How about if "Remove dots at beginning/end" actually strips them instead of replacing them with $text = preg_replace( array( "#[^a-zA-Z0-9_!\.-]+#",
"#^[\.]+|[!\.{$sepQ}]+$#", # Remove dots at beginning/end
"#\.\.+#", # Remove double dots
"#[{$sepQ}]+#", # Turn multiple separators into one
"#^[{$sepQ}]+|[{$sepQ}]+$#" ), # Strip separator from beginning/end
array( $sep,
"",
$sep,
$sep,
"" ),
$text ); Perhaps this new regex could also be merged with the last regex. |
@gabrielfin That sounds ok to me. |
…oes not work in emails
I updated the PR with the proposed regex. I also merged it with the last regex, since they were actually very similar and it also fixes an additional test case: dot preceded by a non char at the beginning of the url (ie I also applied the same to On a sidenote: the usage of |
+1, works in my test. |
I had a look, it's full of regular expressions 😄 |
Note: This does not strip exclamation marks from the beginning of strings, but the original didn't do that either. |
Merged. Thanks @gabrielfin! |
* master: (40 commits) A quick hack to support html entities in RSS imported item descriptions. Fix EZP-27321: Update TinyMCE to 3.5.12 and patch for "Uncaught DOMEx… (ezsystems#1297) EZP-27011: Solr index not updated when changing a content priority (ezsystems#1283) EZP-15983 - Only include ezp_override when present (ezsystems#1270) Add state change/assign to the audit log (ezsystems#1285) EZP-27092: Remove eZAutoLink operator usage of preg_replace and PREG_REPLACE_EVAL (ezsystems#1286) Fix EZP-26911: Embedded PDF files are downloadable though they are in trash EZP-27000: Remove uploader.swf from all repos/branches Fix EZP-26659: The package component is vulnerable to arbitrary file upload Fix EZP-26405: SQL Injection in Search Component (ezsearchengine) Setting to have different cache based on the request protocol Fix EZP-26832: Enabling editor causes error on links with "&" (ezsystems#1278) Making sure all affected PHP versions are handled Fix EZP-26798: Query parameters get lost when being redirected with mobile device detect filter Fix EZP-26405: SQL Injection in Search Component (ezsearchengine) (ezsystems#105) Fix EZP-26449: Wrong version translation list in eZContentOperationCollection Fix EZP-26427: ezoe popup search string not urlencoded Fix EZP-26354: Autolink fails if you try to link content in your own site (ezsystems#1263) Fix EZP-25031: eZContentUpload is not providing original file name to custom UploadHandler (ezsystems#1228) Fix EZP-26276: Exclamation mark followed by non-chars at end of URL does not work in emails (ezsystems#1260) ...
Fix for https://jira.ez.no/browse/EZP-14719 (old zombie issue)
https://jira.ez.no/browse/EZP-26276 (new incarnation)
This is "My Article!"
becomesThis-is-My-Article!
. The exclamation mark should not be there.