Skip to content

Commit e6c324a

Browse files
committed
Imporoved xss protection on error messages
1 parent e1330cd commit e6c324a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

FileMap.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
1616
padding-bottom: 7px;
1717
}
1818
#errorText {
19-
border-radius: 5px;
2019
border: red 2px solid;
2120
display: inline-block;
2221
padding-right: 10px;
2322
padding-left: 10px;
2423
margin-bottom: 10px;
24+
width: 50%;
25+
max-width: 420px;
26+
border-radius: 5px;
2527
}
2628
#scanPath {
2729
width: 50%;

visualize.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ func netHandleCrawl(r *http.Request, rootDir *string, srcHierchy *srcDir, displa
202202
*srcHierchy, err = buildFileHeirchy(*rootDir, wantedExts)
203203
if err != nil {
204204
*displayTitle = "❌ Failed Visualizing " + *rootDir
205-
return "An error has occured. Ensure you entered a valid directory path.<br />Error: " + err.Error()
205+
return "An error has occured. Ensure you entered a valid directory path. Error: " + err.Error()
206206
}
207207
return ""
208208
}

0 commit comments

Comments
 (0)