Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[ErrorHandler] Fix error caused byinclude + open_basedir#40242
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedFeb 18, 2021
Hey! I see that this is your first PR. That is great! Welcome! Symfony has acontribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
includeincludeincludeincludeincludeincludeincludeincludecarsonbot commentedFeb 19, 2021
Hey! I see that more good work is coming your way. I think@awoimbee has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
includeinclude + open_basedir15a001b to9ad7832Compare
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
(I updated the implementation)
nicolas-grekas commentedMar 16, 2021
Thank you@stlrnz. |
PhilETaylor commentedApr 27, 2021
Only just seen this. Sorry that my implementation of#37492 caused issued, and thank you for fixing it :) |
#37492 introduced the option to specify your own error template using
HtmlErrorRenderer::setTemplate('...');However, the implementation using
file_exists(...)inincludecan cause an error when not setting a custom template.As you can see the error is caused by checking
file_exists(...)using relative paths in environments with a restrictiveopen_basedirpolicy.The proposed solution always uses absolute paths to include errors templates (and other files).