Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expression list, skipping empty patch #17

Closed
wants to merge 1 commit into from
Closed

Conversation

sa-ny
Copy link
Owner

@sa-ny sa-ny commented Sep 19, 2024

No description provided.

Copy link

Caution

Breaking Flaws identified in code!

Fixes for app/templates/app/feed.html:
Falws found for this file:
CWE 80 - Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) - Severity 3 on line 160 for issue 1002

Fix suggestions:

--- app/templates/app/feed.html
+++ app/templates/app/feed.html
@@ -157,7 +157,7 @@
 				len : 10
 			}, function(data) {
 				if (data) {
-					$("#feed ul").append(data);
+$("#feed ul").append(DOMPurify.sanitize(data));
 				} else {
 					$(obj).remove();
 				}

Copy link

Caution

Breaking Flaws identified in code!

Fixes for app/templates/app/profile.html:
Falws found for this file:
CWE 80 - Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) - Severity 3 on line 224 for issue 1003
CWE 80 - Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) - Severity 3 on line 219 for issue 1001

Fix suggestions:

--- app/templates/app/profile.html
+++ app/templates/app/profile.html
@@ -216,12 +216,12 @@
 								$('input[name="' + key + '"]').val(val);
 								if (key === "username") {
 									
-									$('#profileImage').attr('src', image_path + val + '.png');
+$('#profileImage').attr('src', DOMPurify.sanitize(image_path + val + '.png'));
 								}
 							});
 						}
 						if ('message' in data) {
-							$('body').append(data.message);
+$('body').append(DOMPurify.sanitize(data.message));
 						}
 					}
 				},

@sa-ny sa-ny closed this Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant