You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@usergrid.apache.org by "Anuradha Weeraman (JIRA)" <ji...@apache.org> on 2014/04/20 17:46:17 UTC

[jira] [Assigned] (USERGRID-20) management/token response invalid json with unescaped double quotes

     [ https://issues.apache.org/jira/browse/USERGRID-20?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anuradha Weeraman reassigned USERGRID-20:
-----------------------------------------

    Assignee: Anuradha Weeraman

> management/token response invalid json with unescaped double quotes
> -------------------------------------------------------------------
>
>                 Key: USERGRID-20
>                 URL: https://issues.apache.org/jira/browse/USERGRID-20
>             Project: Usergrid
>          Issue Type: Bug
>          Components: Stack
>            Reporter: Rod Simpson
>            Assignee: Anuradha Weeraman
>             Fix For: 1.1
>
>
> "When I requested an org level access token, I got back a response that is not entirely valid JSON. The user data contains unescaped double quotes in the value of htmldisplayEmailAddress. (e.g. ""htmldisplayEmailAddress"": ""fdsafdsag@fdsafdsa.com &lt;<a href=""mailtofdsafdsa@fdsafdsa.com"">users@users.com</a>&gt;""). In general I would expect any response values to be escaped. 
> I can still get the access token, but it's inconvenient to hack out the invalid JSON or regex extract the token. 
> Request: 
> https://api.usergrid.com/management/token 
> { 
> ""client_id"": ""b3U6mdJ8fG8-EeKo-wLoGuZA3A"", 
> ""client_secret"": ""b3U6QFHI9XmAb6URjWIWyeQ4hL0rUp4"", 
> ""grant_type"": ""client_credentials"" 
> } 
> Response data: 
> { 
> ""access_token"": ""YWMtDt5kJqFPEeK6oQLoGuZA3AAAAT4UaCW40v5miNZPHHkIG-q1_whQuxloPb0"", 
> ""expires_in"": 3600, 
> ""organization"": { 
> ""users"": { 
> ""user"": { 
> ""applicationId"": ""00000000-0000-0000-0000-000000000001"", 
> ""username"": ""usern"", 
> ""name"": ""user"", 
> ""email"": ""usert@user.com"", 
> ""activated"": true, 
> ""disabled"": false, 
> ""properties"": { 
> ""activated"": true, 
> ""confirmed"": true, 
> ""disabled"": false, 
> ""email"": ""usert@user.com"", 
> ""name"": ""user"", 
> ""username"": ""user"" 
> }, 
> ""uuid"": ""3e2fb4e2-e32e-11e1-8bdf-12313d1ca11d"", 
> ""adminUser"": true, 
> ""displayEmailAddress"": ""user <us...@user.com>"", 
> ""htmldisplayEmailAddress"": ""user &lt;<a href=""mailto: usert@user.com"">usert@user.com</a>&gt;"" 
> }, 
> ""selenium"": { 
> ""applicationId"": ""00000000-0000-0000-0000-000000000001"", 
> ""username"": ""selenium"", 
> ""name"": ""selenium"", 
> ""email"": ""selenium@user.com"", 
> ""activated"": true, 
> ""disabled"": false, 
> ""properties"": { 
> ""activated"": true, 
> ""confirmed"": true, 
> ""disabled"": false, 
> ""email"": ""selenium@user.com"", 
> ""name"": ""selenium"", 
> ""username"": ""selenium"" 
> }, 
> ""uuid"": ""b6aaac0a-6f3e-11e2-a8fb-02e81ae640dc"", 
> ""adminUser"": true, 
> ""displayEmailAddress"": ""selenium <se...@user.com>"", 
> ""htmldisplayEmailAddress"": ""selenium &lt;<a href=""mailto: selenium@uawe.com"">selenium@user.com</a>&gt;"" 
> }, 
> ""fdsaefong@user.com"": { 
> ""applicationId"": ""00000000-0000-0000-0000-000000000001"", 
> ""username"": ""fdsafdsa@user.com"", 
> ""name"": ""fdsafdsa@user.com"", 
> ""email"": ""fdsafdsa@user.com"", 
> ""activated"": false, 
> ""disabled"": false, 
> ""properties"": { 
> ""activated"": false, 
> ""confirmed"": false, 
> ""disabled"": false, 
> ""email"": ""fdsafdsa@user.com"", 
> ""name"": ""fdsafdas@user.com"", 
> ""username"": ""fdsafdsa@user..com"" 
> }, 
> ""uuid"": ""e84014f9-6f40-11e2-a8fb-02e81ae640dc"", 
> ""adminUser"": true, 
> ""displayEmailAddress"": ""fdsafdsa@user.com <fd...@user.com>"", 
> ""htmldisplayEmailAddress"": ""fdsafdsa@user.com &lt;<a href=""mailto: fdsafdsa@user.com"">fdsafdsa@user.com</a>&gt;"" 
> } 
> }, 
> ""name"": ""something"", 
> ""applications"": { 
> ""something/test2"": ""8ffacc48-9bda-11e2-9593-02e81adcf3d0"", 
> ""something/test"": ""97d00b30-6f40-11e2-81cf-02e81ac5a17b"" 
> }, 
> ""uuid"": ""99d27c7c-6f3e-11e2-a8fb-02e81ae640dc"" 
> } 
> }"



--
This message was sent by Atlassian JIRA
(v6.2#6252)