Uploaded image for project: 'Share Application'
  1. Share Application
  2. SHA-1725

[share] Senseless check on Opera with redirect to login page?

    Details

    • Bug Priority:
      Category 1
    • Story Points:
      3

      Description

      This is maybe just a question, maybe a hidden issue: when you look into the source of SSOAuthenticationFilter.java, you will find these lines nearly at the beginning of the filter() method:

      // Check if the browser is Opera, if so then display the login page as Opera does not
      // support NTLM and displays an error page if a request to use NTLM is sent to it
      String userAgent = req.getHeader("user-agent");
      if (userAgent != null && userAgent.indexOf("Opera ") != -1) {
          if (debug)
              logger.debug("Opera detected, redirecting to login page");
      
          redirectToLoginPage(req, res);
          return;
      }
      

      The first problem with this is that it actually doesn't match the current version of Opera, as this sends the user-agent header in the "Opera/x.y" form, not "Opera " (notice the space).

      The second problem is that if it ever matched the Opera, then it would cause an endless loop after a user tries to log in (confirmed by faking the user-agent header). So I wonder what is this code really good for?

        Attachments

          Structure

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                p_bodnar Petr Bodnár
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h

                    Structure Helper Panel