mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
2292a9cbd9
Previously, the regular expression used by the compiler's ShadowDOM CSS shim to strip comments from CSS text was susceptible to [catastrophic backtracking][1], which could lead to exponential (O(2^n)) increase in complexity/execution time. More specifically, this would be triggered if the processed text contained an unterminated comment with lots of leading whitespace (i.e. `/*`, followed by lots of whitespace characters and no closing `*/`). Although such input is unlikely in real-world scenarios, this commit improves the regular expression to not be susceptible to this issue. [1]: https://www.regular-expressions.info/catastrophic.html PR Close #43456
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT