File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 105105 Route route = new Route (_absoluteUri , SiteState .Alias .Path );
106106 int moduleid = (int .TryParse (route .ModuleId , out moduleid )) ? moduleid : - 1 ;
107107 var action = (! string .IsNullOrEmpty (route .Action )) ? route .Action : Constants .DefaultAction ;
108+
108109 var querystring = Utilities .ParseQueryString (route .Query );
109110 var returnurl = " " ;
110111 if (querystring .ContainsKey (" returnurl" ))
111112 {
112113 returnurl = WebUtility .UrlDecode (querystring [" returnurl" ]);
114+ if (! returnurl .StartsWith (" /" ))
115+ {
116+ // urls which are not relative are vulnerable to open redirects or XSS
117+ returnurl = " " ;
118+ querystring [" returnurl" ] = " " ;
119+ }
113120 }
114121
115122 // reload the client application from the server if there is a forced reload
You can’t perform that action at this time.
0 commit comments