-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c9834e
commit defa86a
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Security: Mitigate XSS | ||
|
||
We've mitigated an XSS vulnerability resulting from not sanitising the HTTP requests. | ||
net/http provides a router – ServeMux, which does more than routing, it also sanitises | ||
the requests. | ||
Instead of using ServeMux we were directly using an http.Handler which routes the | ||
request based on the URL.Path without sanitizing it. | ||
Besides, in pkg/siteacc/siteacc.go and internal/http/services/ocmd/invites.go we were | ||
creating http responses with user-provided values. | ||
This patch adds a http.ServeMux to sanitise the request before reaching any other | ||
handler and uses html.EscapeString to sanitise the user-provided values in the http | ||
responses of pkg/siteacc/siteacc.go and internal/http/services/ocmd/invites.go. | ||
|
||
https://github.com/cs3org/reva/pull/3316 |