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

[Blazor] Security - interactive-server-side-rendering - script tags #34202

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hakenr
Copy link
Member

@hakenr hakenr commented Nov 22, 2024

Script tags aren't allowed and shouldn't be included in the app's component render tree. If a script tag is included in a component's markup, a compile-time error is generated.

I'm not aware of any such compile-time behavior.
While it's not recommended to include script tags in your interactive components (since the behavior can be tricky), there's no built-in mechanism that prevents you from including a script tag in the render tree.


Internal previews

📄 File 🔗 Preview link
aspnetcore/blazor/security/interactive-server-side-rendering.md Threat mitigation guidance for ASP.NET Core Blazor interactive server-side rendering

@guardrex
Copy link
Collaborator

guardrex commented Nov 22, 2024

This goes back to the inception of the article five years ago on #13962, written by Javier and reviewed by Steve Sanderson and Ryan Nowak when he worked on Blazor. It's at Line 194 of ...

https://github.com/dotnet/AspNetCore.Docs/pull/13962/files#diff-4962dbf450346ed225e83e082be3ddbae62e523fd1980145aa2af347ec62a2eaR194

Stand-by while I get them on here to take a look.

@guardrex guardrex self-assigned this Nov 22, 2024
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.

2 participants