private void parseQueryString(String queryStr, GuacamoleConfiguration config)
            throws GuacamoleException {

        // Split the query string into the pairs
        List<String> paramList = Arrays.asList(queryStr.split("&"));

        // Loop through key/value pairs and put them in the Map.
        for (String param : paramList) {
            String[] paramArray = param.split("=", 2);
            try {
                String paramName = URLDecoder.decode(paramArray[0], "UTF-8");
                String paramValue = URLDecoder.decode(paramArray[1], "UTF-8");
                if (paramIsAllowed(paramName))
                    config.setParameter(paramName, paramValue);
            }
            catch (UnsupportedEncodingException e) {
                throw new GuacamoleServerException("Unexpected lack of UTF-8 encoding support.", e);
            }
        }
    }
Parse the given string for parameter key/value pairs and update the
provided GuacamoleConfiguration object with the parsed values, checking
to make sure that the parser is allowed to provide the requested
parameters.

@param queryStr
    The query string to parse for key/value pairs.

@param config
    The GuacamoleConfiguration object that should be updated with the
    parsed parameters.

@throws GuacamoleException
    If Java unexpectedly lacks UTF-8 support.
extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/utility/QCParser.java