Skip to content

Commit d0afbd6

Browse files
authored
Merge pull request #496 from axa-group/security_fix
Security fix
2 parents c43adef + 4e561c9 commit d0afbd6

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

demo/doc-versioning/doc_versioning/gui/document.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,16 @@
2121

2222
<!-- differ
2323
-- --------------------------------------------------- -->
24-
24+
25+
<!-- clickjacking protection-->
26+
<style> html {display : none; } </style>
27+
<script>
28+
if ( self === top ) {
29+
document.documentElement.style.display = 'block';
30+
} else {
31+
top.location = self.location;
32+
}
33+
</script>
2534
</head>
2635
<body>
2736
<div style="text-align: center; margin-top: 50px; margin-left: 50px">

demo/doc-versioning/doc_versioning/gui/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<link rel="stylesheet" href="{{ url_for('static', filename='css/skeleton.css') }}">
2121
</head>
2222
<body>
23-
<a href="http://par.sr" target="_blank" style="outline:none;border:none;" onclick="openLink(event)">
23+
<a href="http://par.sr" target="_blank" rel="noopener noreferrer" style="outline:none;border:none;" onclick="openLink(event)">
2424
<img src="{{ url_for('static', filename='images/logo.png') }}" width="15%" alt="Parsr Powered" border="0" />
2525
</a>
2626
<div style="text-align: center; margin-top: 50px;">

demo/echo-module-py/echo-module.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@
2121

2222
class PostHandler(BaseHTTPRequestHandler):
2323
def do_POST(self):
24+
2425
content_length = int(self.headers['Content-Length'])
2526
post_data = self.rfile.read(content_length)
2627
json_data = json.loads(post_data)
2728

2829
new_json_data = process_data(json_data)
2930

3031
self.send_response(200)
32+
self.send_header("Content-type", "application/json")
3133
self.end_headers()
3234
self.wfile.write(json.dumps(new_json_data).encode('utf8'))
3335

0 commit comments

Comments
 (0)