mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb/CSP: Implement the script-src-attr directive
This commit is contained in:
parent
f382bccc3d
commit
f50f23b19f
Notes:
github-actions[bot]
2025-07-12 01:07:50 +00:00
Author: https://github.com/Lubrsi
Commit: f50f23b19f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5404
Reviewed-by: https://github.com/shannonbooth ✅
5 changed files with 77 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
|||
#include <LibWeb/ContentSecurityPolicy/Directives/MediaSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/Names.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/ObjectSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/ScriptSourceAttributeDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/ScriptSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/ScriptSourceElementDirective.h>
|
||||
|
||||
|
@ -43,6 +44,9 @@ GC::Ref<Directive> create_directive(GC::Heap& heap, String name, Vector<String>
|
|||
if (name == Names::ObjectSrc)
|
||||
return heap.allocate<ObjectSourceDirective>(move(name), move(value));
|
||||
|
||||
if (name == Names::ScriptSrcAttr)
|
||||
return heap.allocate<ScriptSourceAttributeDirective>(move(name), move(value));
|
||||
|
||||
if (name == Names::ScriptSrc)
|
||||
return heap.allocate<ScriptSourceDirective>(move(name), move(value));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue