UsernamePasswordLoginServlet bug?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

UsernamePasswordLoginServlet bug?

Jon Stockdill
In the following code, should (request == null) be (requestContext ==
null) ?  I have never encountered a null request obj in a servlet
container.

requestContext + request.getServletPath() seems to be being set to:
null/Authn/UserPassword

--jon


 protected void redirectToLoginPage(HttpServletRequest request,
HttpServletResponse response,
            List<Pair<String, String>> queryParams) {

        String requestContext =
DatatypeHelper.safeTrimOrNullString(request.getContextPath());
        if(request == null){
            requestContext = "/";
        }
        request.setAttribute("actionUrl", requestContext +
request.getServletPath());
Reply | Threaded
Open this post in threaded view
|

Re: UsernamePasswordLoginServlet bug?

Chad La Joie
Yep, it's a bug.  Go ahead and file it.

Jon Stockdill wrote:

> In the following code, should (request == null) be (requestContext ==
> null) ?  I have never encountered a null request obj in a servlet
> container.
>
> requestContext + request.getServletPath() seems to be being set to:
> null/Authn/UserPassword
>
> --jon
>
>
>  protected void redirectToLoginPage(HttpServletRequest request,
> HttpServletResponse response,
>             List<Pair<String, String>> queryParams) {
>
>         String requestContext =
> DatatypeHelper.safeTrimOrNullString(request.getContextPath());
>         if(request == null){
>             requestContext = "/";
>         }
>         request.setAttribute("actionUrl", requestContext +
> request.getServletPath());

--
SWITCH
Serving Swiss Universities
--------------------------
Chad La Joie, Software Engineer, Net Services
Werdstrasse 2, P.O. Box, 8021 Zürich, Switzerland
phone +41 44 268 15 75, fax +41 44 268 15 68
[hidden email], http://www.switch.ch

Reply | Threaded
Open this post in threaded view
|

Re: UsernamePasswordLoginServlet bug?

Jon Stockdill
Cool.  I did my best to provide as much information as possible.
  https://bugs.internet2.edu/jira/browse/SIDP-277

--jon



On Thu, Jan 15, 2009 at 10:04 AM, Chad La Joie <[hidden email]> wrote:

> Yep, it's a bug.  Go ahead and file it.
>
> Jon Stockdill wrote:
>> In the following code, should (request == null) be (requestContext ==
>> null) ?  I have never encountered a null request obj in a servlet
>> container.
>>
>> requestContext + request.getServletPath() seems to be being set to:
>> null/Authn/UserPassword
>>
>> --jon
>>
>>
>>  protected void redirectToLoginPage(HttpServletRequest request,
>> HttpServletResponse response,
>>             List<Pair<String, String>> queryParams) {
>>
>>         String requestContext =
>> DatatypeHelper.safeTrimOrNullString(request.getContextPath());
>>         if(request == null){
>>             requestContext = "/";
>>         }
>>         request.setAttribute("actionUrl", requestContext +
>> request.getServletPath());
>
> --
> SWITCH
> Serving Swiss Universities
> --------------------------
> Chad La Joie, Software Engineer, Net Services
> Werdstrasse 2, P.O. Box, 8021 Zürich, Switzerland
> phone +41 44 268 15 75, fax +41 44 268 15 68
> [hidden email], http://www.switch.ch
>
>
Reply | Threaded
Open this post in threaded view
|

Re: UsernamePasswordLoginServlet bug?

Jon Stockdill
On Thu, Jan 15, 2009 at 10:22 AM, Jon Stockdill <[hidden email]> wrote:
> Cool.  I did my best to provide as much information as possible.
>  https://bugs.internet2.edu/jira/browse/SIDP-277


Sorry about the top post... bad habit
Reply | Threaded
Open this post in threaded view
|

Re: UsernamePasswordLoginServlet bug?

Chad La Joie
Well, for the record, I don't mind top posting.  I do it if the response
is to the email as a whole (that way people don't have to spend time
scrolling down through all the past emails).  If I'm responding to a
number of different things within the email then I try to inline it in
order to provide the context.

Jon Stockdill wrote:
> Sorry about the top post... bad habit

--
SWITCH
Serving Swiss Universities
--------------------------
Chad La Joie, Software Engineer, Net Services
Werdstrasse 2, P.O. Box, 8021 Zürich, Switzerland
phone +41 44 268 15 75, fax +41 44 268 15 68
[hidden email], http://www.switch.ch