-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Nested execution of {{ directive }} in html loaded via {{httpInclude}} #6745
Comments
Do you have an example of an The templates HTTP handler intentionally evaluates templates as interpretable HTML so that they can be used in HTML documents. (The intention is to template HTML pages, not just the text that appears within hard-coded HTML.) I can think of ways that a template could be insecure by allowing untrusted input to be evaluated, but that is nothing new or special to Caddy templates. |
If content loaded to [div id="email"] contain any {{ }} directives (intentionally or unintentionally), they will be executed as well, it should be avoided. API call is substituted by UNTRUSTED static content: Caddyfile
TEMPLATE
|
This comment has been minimized.
This comment has been minimized.
I need to bypass execution of {{ directives }} in httpInclude content. Not escape html. To clarify situation, this is part of loaded via httpInclude content:
Caddy return error 520 |
Ok, now I understand after seeing the example, and the issue title makes sense. Sorry for the confusion. |
You can adjust the delimiters using the |
Loadable content is THOUSANDS of externally provided e-mail messages. So there are NO delimiters that can be treated as safe. Thanks for suggestion, I'll apply it as temporary solution, but creating version of httpIncludeNoscript would be much safer. |
What's a good word other than "include" or "import" for that? |
How about |
Yeah, that could work. I'll add this enhancement to my list. 👍 |
Looks promising, tnx! |
Perhaps |
Well, we might want a |
Hi, folks, Happy New Year! |
Is it expected behavior?
How to disable running template code in HTML loaded via {{ httpInclude }} ?
It is not secure and could lead to unpredictable results.
The text was updated successfully, but these errors were encountered: