Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
a6b7d090
Commit
a6b7d090
authored
Aug 07, 2014
by
Dele Olajide
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #58 from surevine/dwd/OF-834
OF-834: Close Open_redirect
parents
d0f3851d
549dc1a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
login.jsp
src/web/login.jsp
+25
-1
No files found.
src/web/login.jsp
View file @
a6b7d090
...
...
@@ -17,6 +17,8 @@
<%@ page
import=
"java.util.Map"
%>
<%@ page
import=
"org.jivesoftware.util.*"
%>
<%@ page
import=
"org.jivesoftware.admin.LoginLimitManager"
%>
<%@ page
import=
"java.net.URL"
%>
<%@ page
import=
"java.lang.StringBuilder"
%>
<%@ taglib
uri=
"http://java.sun.com/jstl/core_rt"
prefix=
"c"
%>
<%@ taglib
uri=
"http://java.sun.com/jstl/fmt_rt"
prefix=
"fmt"
%>
...
...
@@ -31,7 +33,29 @@
return
"index.jsp"
;
}
else
{
return
url
;
if
(
url
.
startsWith
(
"/"
))
{
return
url
;
}
try
{
URL
u
=
new
URL
(
url
);
StringBuilder
s
=
new
StringBuilder
();
if
(
u
.
getPath
().
equals
(
""
))
{
s
.
append
(
"/"
);
}
else
{
s
.
append
(
u
.
getPath
());
}
if
(
u
.
getQuery
()
!=
null
)
{
s
.
append
(
'?'
);
s
.
append
(
u
.
getQuery
());
}
if
(
u
.
getRef
()
!=
null
)
{
s
.
append
(
'#'
);
s
.
append
(
u
.
getRef
());
}
return
s
.
toString
();
}
catch
(
Exception
e
)
{
return
"index.jsp"
;
}
}
}
%>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment