forked from rohitcoderCdefense/vulnCodes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CWE-451.js
29 lines (29 loc) · 1.26 KB
/
CWE-451.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
var modal = document.createElement("div");
modal.setAttribute("class", "modal fade");
modal.setAttribute("id", "myModal");
modal.setAttribute("role", "dialog");
modal.setAttribute("tabindex", "-1");
modal.setAttribute("aria-labelledby", "myModalLabel");
modal.setAttribute("aria-hidden", "true");
modal.setAttribute("data-backdrop", "static");
modal.setAttribute("data-keyboard", "false");
modal.innerHTML = `
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="myModalLabel">You received a image from one of your friend!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to download Camera_selfie.png image ?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" id="download">Download</button>
</div>
</div>
</div>
`;
document.body.appendChild(modal);