Skip to content
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

SAK-44702 Long img alt text with linebreaks can cause StackOverflowError #8832

Merged

Conversation

smarquard
Copy link
Contributor

The paragraph regexp is too complex for long img alt text which includes linebreaks. This uses a simpler regexp for alt text.

However, I'm not totally sure whether it's ok to simplify to this extent and this should be reviewed to see if there's anything that actually should not be permitted in alt text, in which case an intermediate regexp may be required that's simpler than paragraph but more complex than anyWithPara.

The paragraph regexp is too complex for long img alt text which includes
linebreaks. This uses a simpler regexp for alt text.
Copy link
Contributor

@adrianfish adrianfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with this going in and then getting a bit of testing. It does seem like overkill applying the paragraph regexp to a simple alt text. Alt texts can't be supplied by the user, so the risk is a lot lower than what I guess is the target of the paragraph regexp.

@bjones86 bjones86 merged commit c798cf8 into sakaiproject:master Dec 3, 2020
ern pushed a commit that referenced this pull request Mar 30, 2021
…ror (#8832)

The paragraph regexp is too complex for long img alt text which includes linebreaks. This uses a simpler regexp for alt text.

(cherry picked from commit c798cf8)
ern pushed a commit that referenced this pull request Apr 19, 2021
…ror (#8832)

The paragraph regexp is too complex for long img alt text which includes linebreaks. This uses a simpler regexp for alt text.

(cherry picked from commit c798cf8)
bjones86 pushed a commit to Western-OWL/sakai that referenced this pull request Oct 15, 2021
…use StackOverflowError (sakaiproject#8832)

The paragraph regexp is too complex for long img alt text which includes linebreaks. This uses a simpler regexp for alt text.

(cherry picked from commit c798cf8)
(cherry picked from commit d7f43d1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants