You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Pan Jie (JIRA)" <ji...@apache.org> on 2009/05/11 08:25:45 UTC

[jira] Created: (SHINDIG-1054) cannot applying multiple fields in restful api with oauth arguments

cannot applying multiple fields in restful api with oauth arguments
-------------------------------------------------------------------

                 Key: SHINDIG-1054
                 URL: https://issues.apache.org/jira/browse/SHINDIG-1054
             Project: Shindig
          Issue Type: Bug
          Components: PHP
    Affects Versions: trunk
            Reporter: Pan Jie
            Priority: Minor
             Fix For: trunk


Assuming i want to fetch such a url: 
http://shindig/social/rest/people/1/@self?fields=gender,name

After oauth signing, url will be:
http://shindig/social/rest/people/1/@self?oauth_nonce=e8ee41728d2d062063f6ba6eaa98dda6&oauth_timestamp=1241666501&oauth_consumer_key=d3d9cee5-fef5-cee6-a1f2-f1e5f3e8c0fa&fields=gender%2Cname&oauth_signature_method=HMAC-SHA1&oauth_signature=EN1GhZ81dgAEJVauLJfRHFNdfJE%3D&

So parameter "fields=gender,name" will be encoded to "fields=gender%2Cname" which lead to a bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-1054) cannot applying multiple fields in restful api with oauth arguments

Posted by "Pan Jie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pan Jie updated SHINDIG-1054:
-----------------------------

    Attachment: 20090511.patch

Here are what I did in this patch:
1. fixed RestRequestItem::parseQuery, urldecode for each query value.
2. removed parseQuery calling from RestRequestItem->applyUrlTemplate, instead, parseQuery in RestRequestItem->createWithRequest if necessary
3. added a unittest to reproduce this issue
4. added 'src/gadgets/render', 'src/gadgets/rewrite' to __autoload path

> cannot applying multiple fields in restful api with oauth arguments
> -------------------------------------------------------------------
>
>                 Key: SHINDIG-1054
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1054
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: trunk
>            Reporter: Pan Jie
>            Priority: Minor
>             Fix For: trunk
>
>         Attachments: 20090511.patch
>
>
> Assuming i want to fetch such a url: 
> http://shindig/social/rest/people/1/@self?fields=gender,name
> After oauth signing, url will be:
> http://shindig/social/rest/people/1/@self?oauth_nonce=e8ee41728d2d062063f6ba6eaa98dda6&oauth_timestamp=1241666501&oauth_consumer_key=d3d9cee5-fef5-cee6-a1f2-f1e5f3e8c0fa&fields=gender%2Cname&oauth_signature_method=HMAC-SHA1&oauth_signature=EN1GhZ81dgAEJVauLJfRHFNdfJE%3D&
> So parameter "fields=gender,name" will be encoded to "fields=gender%2Cname" which lead to a bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-1054) cannot applying multiple fields in restful api with oauth arguments

Posted by "Pan Jie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pan Jie updated SHINDIG-1054:
-----------------------------

    Attachment:     (was: 20090511.patch)

> cannot applying multiple fields in restful api with oauth arguments
> -------------------------------------------------------------------
>
>                 Key: SHINDIG-1054
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1054
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: trunk
>            Reporter: Pan Jie
>            Priority: Minor
>             Fix For: trunk
>
>         Attachments: 20090511-3.patch
>
>
> Assuming i want to fetch such a url: 
> http://shindig/social/rest/people/1/@self?fields=gender,name
> After oauth signing, url will be:
> http://shindig/social/rest/people/1/@self?oauth_nonce=e8ee41728d2d062063f6ba6eaa98dda6&oauth_timestamp=1241666501&oauth_consumer_key=d3d9cee5-fef5-cee6-a1f2-f1e5f3e8c0fa&fields=gender%2Cname&oauth_signature_method=HMAC-SHA1&oauth_signature=EN1GhZ81dgAEJVauLJfRHFNdfJE%3D&
> So parameter "fields=gender,name" will be encoded to "fields=gender%2Cname" which lead to a bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SHINDIG-1054) cannot applying multiple fields in restful api with oauth arguments

Posted by "Chris Chabot (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Chabot resolved SHINDIG-1054.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0.x-incubating
         Assignee: Chris Chabot

Very nice catch finding that bug, patch's looked good to me and have been committed.

Thanks!

> cannot applying multiple fields in restful api with oauth arguments
> -------------------------------------------------------------------
>
>                 Key: SHINDIG-1054
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1054
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: trunk
>            Reporter: Pan Jie
>            Assignee: Chris Chabot
>            Priority: Minor
>             Fix For: trunk, 1.0.x-incubating
>
>         Attachments: 20090511-3.patch, branches-2009-05-11.patch
>
>
> Assuming i want to fetch such a url: 
> http://shindig/social/rest/people/1/@self?fields=gender,name
> After oauth signing, url will be:
> http://shindig/social/rest/people/1/@self?oauth_nonce=e8ee41728d2d062063f6ba6eaa98dda6&oauth_timestamp=1241666501&oauth_consumer_key=d3d9cee5-fef5-cee6-a1f2-f1e5f3e8c0fa&fields=gender%2Cname&oauth_signature_method=HMAC-SHA1&oauth_signature=EN1GhZ81dgAEJVauLJfRHFNdfJE%3D&
> So parameter "fields=gender,name" will be encoded to "fields=gender%2Cname" which lead to a bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-1054) cannot applying multiple fields in restful api with oauth arguments

Posted by "Pan Jie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pan Jie updated SHINDIG-1054:
-----------------------------

    Comment: was deleted

(was: Here are what I did in this patch:
1. fixed RestRequestItem::parseQuery, urldecode for each query value.
2. removed parseQuery calling from RestRequestItem->applyUrlTemplate, instead, parseQuery in RestRequestItem->createWithRequest if necessary
3. added a unittest to reproduce this issue
4. added 'src/gadgets/render', 'src/gadgets/rewrite' to __autoload path)

> cannot applying multiple fields in restful api with oauth arguments
> -------------------------------------------------------------------
>
>                 Key: SHINDIG-1054
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1054
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: trunk
>            Reporter: Pan Jie
>            Priority: Minor
>             Fix For: trunk
>
>         Attachments: 20090511-3.patch
>
>
> Assuming i want to fetch such a url: 
> http://shindig/social/rest/people/1/@self?fields=gender,name
> After oauth signing, url will be:
> http://shindig/social/rest/people/1/@self?oauth_nonce=e8ee41728d2d062063f6ba6eaa98dda6&oauth_timestamp=1241666501&oauth_consumer_key=d3d9cee5-fef5-cee6-a1f2-f1e5f3e8c0fa&fields=gender%2Cname&oauth_signature_method=HMAC-SHA1&oauth_signature=EN1GhZ81dgAEJVauLJfRHFNdfJE%3D&
> So parameter "fields=gender,name" will be encoded to "fields=gender%2Cname" which lead to a bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-1054) cannot applying multiple fields in restful api with oauth arguments

Posted by "Pan Jie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pan Jie updated SHINDIG-1054:
-----------------------------

    Attachment: 20090511-3.patch

Updated patch file.

Here are what I did in this patch: 
1. removed RestRequestItem::parseQuery, use parse_str instead
2. removed parseQuery calling from RestRequestItem->applyUrlTemplate, instead, parseQuery in RestRequestItem->createWithRequest if necessary
3. added a unittest to reproduce this issue
4. added 'src/gadgets/render', 'src/gadgets/rewrite' to __autoload path

> cannot applying multiple fields in restful api with oauth arguments
> -------------------------------------------------------------------
>
>                 Key: SHINDIG-1054
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1054
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: trunk
>            Reporter: Pan Jie
>            Priority: Minor
>             Fix For: trunk
>
>         Attachments: 20090511-3.patch
>
>
> Assuming i want to fetch such a url: 
> http://shindig/social/rest/people/1/@self?fields=gender,name
> After oauth signing, url will be:
> http://shindig/social/rest/people/1/@self?oauth_nonce=e8ee41728d2d062063f6ba6eaa98dda6&oauth_timestamp=1241666501&oauth_consumer_key=d3d9cee5-fef5-cee6-a1f2-f1e5f3e8c0fa&fields=gender%2Cname&oauth_signature_method=HMAC-SHA1&oauth_signature=EN1GhZ81dgAEJVauLJfRHFNdfJE%3D&
> So parameter "fields=gender,name" will be encoded to "fields=gender%2Cname" which lead to a bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-1054) cannot applying multiple fields in restful api with oauth arguments

Posted by "Pan Jie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pan Jie updated SHINDIG-1054:
-----------------------------

    Attachment: branches-2009-05-11.patch

Patch file branches-2009-05-11.patch is for fixing this issue in branch 1.0.x-incubating.

> cannot applying multiple fields in restful api with oauth arguments
> -------------------------------------------------------------------
>
>                 Key: SHINDIG-1054
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1054
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: trunk
>            Reporter: Pan Jie
>            Priority: Minor
>             Fix For: trunk
>
>         Attachments: 20090511-3.patch, branches-2009-05-11.patch
>
>
> Assuming i want to fetch such a url: 
> http://shindig/social/rest/people/1/@self?fields=gender,name
> After oauth signing, url will be:
> http://shindig/social/rest/people/1/@self?oauth_nonce=e8ee41728d2d062063f6ba6eaa98dda6&oauth_timestamp=1241666501&oauth_consumer_key=d3d9cee5-fef5-cee6-a1f2-f1e5f3e8c0fa&fields=gender%2Cname&oauth_signature_method=HMAC-SHA1&oauth_signature=EN1GhZ81dgAEJVauLJfRHFNdfJE%3D&
> So parameter "fields=gender,name" will be encoded to "fields=gender%2Cname" which lead to a bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.