-
Notifications
You must be signed in to change notification settings - Fork 28
fix: bind empty message string as plain text to avoid xss #216
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
base: main
Are you sure you want to change the base?
fix: bind empty message string as plain text to avoid xss #216
Conversation
328ecee
to
850a3a2
Compare
Makes sense. Can you just please enhance you breaking change note: (but remove the )
|
850a3a2
to
ce92057
Compare
BREAKING CHANGE: `emptyMessage` is no longer interpreted as HTML to prevent XSS attacks. Use content projection for displaying an HTML empty content message: ``` <ngx-datatable> <div empty-content> My rich <i>html</i> content. </div> </ngx-datatable> ```
ce92057
to
15084c5
Compare
After thinking a little longer about: this could actually be very annoying for apps, that used to provide some HTML as config on a global level. Since I agree, that we should not have this, I thought about maybe adding support to provide a component on a global level for empty content. |
I am bit in doubt here if applications would be using a generic html as empty content. It might not make any sense to have such thing in large applications having different feature based tables. e.g application might have a page which list all the users where it says |
@spike-rabbit as we also quickly talked offline about this: I think this change is for our internal applications not that problematic as they pretty much exclusively rely on Lines 18 to 24 in f0fb0fb
I'm therefore also more in favor of finding a longer-term solution that would probably help us too in reducing duplication and fostering alignment. |
Sorry to pop in here unannounced 😅. Two inputs from my side:
|
regarding using [innerHTML] is patched by angular however here we get the value from apps and they may do something like security advisory I wasn't aware of such feature 😄 |
Just my opinion: If one uses I did not test the Security advisories are great! They also allow you to create a private fork of a repo, while you are still working on a fix. That way you can keep the security fixes and discussion private. A bit late for this issue, but good to know if something like this comes up again 😇. |
@Sirius-A thanks a lot for chiming in 🙇 The PR title might be a bit misleading since Angular's Due to that, I frankly don't see a need to create a GitHub security advisory for this case. Both from an Angular and project's point of view, things work as expected: XSS is not possible without @spike-rabbit WDYT? |
Ah I see. The title was indeed a bit confusing to me. I totally agree that there is no need for a security advisory in this case. |
BREAKING CHANGE:
emptyMessage
no longer allow passing html to prevent XSS attacks. use slot based content projectionempty-content
for displaying html rich empty content message.What kind of change does this PR introduce? (check one with "x")
What is the current behavior? (You can also link to an open issue here)
What is the new behavior?
Does this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information: