mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 13:32:24 +00:00
[FIXED JENKINS-7894] Prevent parameter values from disappearing when user is not logged in
This commit is contained in:
1 parent
36ab7131e7
commit
74d2607b8d
2 files changed
+7
-1
No files matched your search
@@ -72,6 +72,9 @@ Upcoming changes</a>
|
||||
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-14769">issue 14769</a>)
|
||||
<li class=bug>
|
||||
Description preview and syntax highlighting broken since 1.477.
|
||||
<li class=bug>
|
||||
Parameter values disappear if user is not logged in
|
||||
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-7894">issue 7894</a>)
|
||||
</ul>
|
||||
</div><!--=TRUNK-END=-->
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
package hudson.security;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import org.acegisecurity.AuthenticationException;
|
||||
import org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint;
|
||||
|
||||
@@ -74,8 +75,10 @@ public class HudsonAuthenticationEntryPoint extends AuthenticationProcessingFilt
|
||||
rsp.sendError(SC_FORBIDDEN);
|
||||
} else {
|
||||
// give the opportunity to include the target URL
|
||||
String uriFrom = req.getRequestURI();
|
||||
if(!Strings.isNullOrEmpty(req.getQueryString())) uriFrom += "?" + req.getQueryString();
|
||||
String loginForm = req.getContextPath()+getLoginFormUrl();
|
||||
loginForm = MessageFormat.format(loginForm, URLEncoder.encode(req.getRequestURI(),"UTF-8"));
|
||||
loginForm = MessageFormat.format(loginForm, URLEncoder.encode(uriFrom,"UTF-8"));
|
||||
req.setAttribute("loginForm", loginForm);
|
||||
|
||||
rsp.setStatus(SC_FORBIDDEN);
|
||||
|
||||
Reference in new issue
Block a user