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 18:00:16 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=13975167#comment-13975167 ]
Anuradha Weeraman commented on USERGRID-20:
-------------------------------------------
Seems like the htmldisplayEmailAddress is escaping the double quotes in my case:
{code}
"htmldisplayEmailAddress":"Test User <<a href=\"mailto:test@usergrid.com\">test@usergrid.com</a>>"
{code}
The response was also lint clean. Ran this on HEAD, can you check if it's still a problem?
> 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 <<a href=""mailtofdsafdsa@fdsafdsa.com"">users@users.com</a>>""). 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 <<a href=""mailto: usert@user.com"">usert@user.com</a>>""
> },
> ""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 <<a href=""mailto: selenium@uawe.com"">selenium@user.com</a>>""
> },
> ""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 <<a href=""mailto: fdsafdsa@user.com"">fdsafdsa@user.com</a>>""
> }
> },
> ""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)