Uploaded image for project: 'Apache Guacamole - Contributions'
  1. Apache Guacamole - Contributions
  2. GUAC-1102

HttpServletRequest within Credentials contains no parameters

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.9.4, 0.9.5, 0.9.6
    • Fix Version/s: 0.9.7
    • Component/s: guacamole
    • Labels:
    • Sprint:
      DEV 2015-04-24
    • Story Points:
      5

      Description

      Although the HTTP request is made available to authentication providers, calls to getParameter() and getParameterMap() will fail, returning null or an empty map respectively, because Jersey / JAX-RS consumes the request earlier on, likely via getInputStream() or getReader().

      See: https://sourceforge.net/p/guacamole/discussion/1110834/thread/e22f94a8/

      Tegereo was able to pass the extra un-recognized parameters by adding a MultivaluedMap to createToken (see attached patch). A more transparent workaround, documented on StackOverflow, would be to wrap the request using HttpServletRequestWrapper, reimplementing getParameter() and getParameterMap() to use this MultivaluedMap: http://stackoverflow.com/questions/22376810/unable-to-retrive-post-data-using-context-httpservletrequest-when-passed-to-oa

      Wrapping the request should allow previously-implemented plugins to "just work" again.

        Attachments

          Activity

            People

            • Assignee:
              mike.jumper Michael Jumper
              Reporter:
              Tegereo Tegereo
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: