AnsweredAssumed Answered

Cmis 1.1 password with special character

Question asked by mundi on Jan 5, 2015
Latest reply on Aug 19, 2016 by cbathe
Hello,

After switching from CMIS 1.0 to CMIS 1.1 I am no longer able to use special chacters in the password to log in (for example "andré" as password).
With CMIS 1.0 this was possible.
Does anyone knows if there is a possiblity to do this in CMIS 1.1? Do I have to encode my password somehow (I tried with "andré", "andr\\u00E9", …)?

Here my implementation to create the alfresco session


private Session createSession(String username, String password) {
    SessionFactory sessionFactory = SessionFactoryImpl.newInstance();

    Map<String, String> parameters = new HashMap<String, String>();
    parameters.put(SessionParameter.READ_TIMEOUT, String.valueOf(60000));

    //User credentials.
    parameters.put(SessionParameter.USER, username);
    parameters.put(SessionParameter.PASSWORD, password); //password is "andré"

    //CMIS 1.1 browser binding
    parameters.put(SessionParameter.BINDING_TYPE, BindingType.BROWSER.value());
    parameters.put(SessionParameter.BROWSER_URL, getAlfrescoServerUrl() + "/alfresco/api/-default-/public/cmis/versions/1.1/browser"); // URL to your CMIS server.

    parameters.put(SessionParameter.AUTH_HTTP_BASIC, "true");
    parameters.put(SessionParameter.COOKIES, "true");

    //Set the alfresco object factory
    try {
            Repository repository = sessionFactory.getRepositories(parameters).get(0);
            return repository.createSession();
    }catch (CmisUnauthorizedException e){
            log.log(Level.WARNING, "createSession(" + username + ").CmisUnauthorizedException.returning NULL-session");
    } catch (CmisPermissionDeniedException e) {
            log.log(Level.WARNING, "createSession(" + username + ").CmisPermissionDeniedException.returning NULL-session");
    }
    return null;
}

Outcomes