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

Add missing escaping in error_exception.php #4171

Merged
merged 2 commits into from
Jan 28, 2021

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Jan 28, 2021

Description

  • Escaping all variable and function output in error_exception.php.
  • Use esc() in all places.

I can not see the message containing <...>.

In the current code, some variables are escaped with ENT_IGNORE, but
I don't know why. It is not recommended, so I change esc()'s default.

ENT_IGNORE
Silently discard invalid code unit sequences instead of returning an empty string. Using this flag is discouraged as it » may have security implications.
https://www.php.net/manual/en/function.htmlspecialchars.php

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

The second argument of htmlspecialchars() is changed.

ENT_IGNORE is never used.
> Using this flag is discouraged as it » may have security implications.
https://www.php.net/manual/en/function.htmlspecialchars.php
@paulbalandan paulbalandan merged commit 10bc291 into codeigniter4:develop Jan 28, 2021
@kenjis kenjis deleted the fix-error_exception.php branch October 9, 2021 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants