keesvandieren commented on code in PR #1341:
URL: https://github.com/apache/wicket/pull/1341#discussion_r2667259390
##########
wicket-core/src/main/java/org/apache/wicket/csp/CSPDirective.java:
##########
@@ -147,6 +151,19 @@ public String getValue()
public void checkValueForDirective(CSPRenderable value,
List<CSPRenderable> existingDirectiveValues)
{
+ if (this == SCRIPT_SRC_ATTR || this == STYLE_SRC_ATTR)
+ {
+ if (!existingDirectiveValues.isEmpty())
+ {
+ throw new IllegalArgumentException("Directive "
+ this + " supports only one value");
Review Comment:
Technically this is true, but in practice only 2 values are allowed: none
and 'unsafe inline'. They contradict each other so shouldn't be used together.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]