fix(core): Error on invalid APP_ID#63252
Conversation
|
We'll need a TGP on this to see if this is a breaking change. |
7abe5e3 to
bf28d36
Compare
bf28d36 to
dad815b
Compare
dad815b to
2a2647e
Compare
AndrewKushnir
left a comment
There was a problem hiding this comment.
Shared some feedback with @JeanMeche via chat. Key points:
- The check should happen sooner (e.g. at the time we create an application injector, using the
ENVIRONMENT_INITIALIZERcallback). - We should throw an error if the
APP_IDvalue is "unsafe", so that we don't need to keep sanitizing it in the codebase at the time when we need to use it (easy to forget adding sanitization at that point).
2a2647e to
cd20e6f
Compare
AndrewKushnir
left a comment
There was a problem hiding this comment.
Looks great, thanks @JeanMeche!
A couple of comments:
- It'd be great to add some tests to verify this behavior
- We should consider adding a similar check to the NgModule-based bootstrap logic as well
|
@JeanMeche This has conflicts that need to be resolved. |
cd20e6f to
4959f3a
Compare
e3d0726 to
5ea4456
Compare
AndrewKushnir
left a comment
There was a problem hiding this comment.
Reviewed-for: public-api
e586446 to
ca37c83
Compare
ca37c83 to
03a679d
Compare
03a679d to
be562d3
Compare
An invalid APP_ID could be responsible to generating broken CSS selectors. (eg `:` is an example for a character that breaks a selector by being a separator for pseudo-selectors.) We now throw an error if the provided value is not alphanumerical
be562d3 to
57dba94
Compare
|
There are a few failures, but I'm pretty sure they're entirely unrelated to this based on the traces. I think this is safe to merge. |
|
This PR was merged into the repository. The changes were merged into the following branches:
|
This reverts commit fec7c28.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |


Unsanitized appIds could be responsible to generating broken CSS selectors. (eg
:is an example for a character that breaks a selector by being a separator for pseudo-selectors.)fixes #63251