Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
bafe8b2c
Commit
bafe8b2c
authored
Aug 05, 2022
by
Dominik Hebeler
Browse files
checking csp for eval only
parent
945d309c
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
metager/resources/js/verify.js
View file @
bafe8b2c
...
...
@@ -3,6 +3,8 @@ require('fetch-ie8');
// Find the key id for the browser-verification
document
.
querySelectorAll
(
"
link
"
).
forEach
(
element
=>
{
// Should get blocked by csp
eval
(
"
window.sp = 1;
"
);
let
href
=
element
.
href
;
let
matches
=
href
.
match
(
/http
[
s
]{0,1}
:
\/\/[^\/]
+
\/
index
\.
css
\?
id=
(
.+
)
/i
);
if
(
!
matches
)
{
...
...
metager/resources/views/layouts/resultpage/verificationHeader.blade.php
View file @
bafe8b2c
...
...
@@ -2,8 +2,5 @@
<html
lang=
"{!! trans('staticPages.meta.language') !!}"
>
<head>
<meta
charset=
"UTF-8"
>
<script>
window
.
sp
=
1
;
</script>
<link
rel=
"stylesheet"
href=
"/index.css?id={{ $key }}"
>
<script
src=
"{{ mix('js/index.js') }}"
></script>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment