Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 134352 - Facebook and Flickr support generate incorrect signatures
Facebook and Flickr support generate incorrect signatures
Product: webservices
Classification: Unclassified
Component: Manager
All All
: P2 (vote)
: 6.x
Assigned To: Peter Liu
Depends on:
  Show dependency treegraph
Reported: 2008-05-02 00:15 UTC by Peter Liu
Modified: 2008-07-10 15:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description Peter Liu 2008-05-02 00:15:05 UTC
For Facebook and Flickr, our generated code for creating the signature URL encodes all the values before doing the
computation.  This can cause certain methods whose inputs contained characters that need to be encoded.

The workaround for this issue is to modify the generated sign() for the respective service's authenticator.
For example, go to FlickrPhotoServiceAuthenticator.sign() and replace "URLEncoder.encode(value, "UTF-8")" with "value".
Comment 1 Peter Liu 2008-05-02 01:13:35 UTC
Fix checked into trunk.

Note: The fix for this issue needs to be ported to the patch1 release.

Comment 2 Peter Liu 2008-05-02 17:22:32 UTC
Here is how to reproduce the issue for Flickr:

1. DnD the people_getPublicPhotos into a class.
2. Set the userid that's in the form of xxxxx@xxx.
(Note: you can find out your userid by calling  people_findByUsername passing your screen name)
3. Run your application and you'll get an invalid signature response without the fix.

For Facebook:
1. DnD marketplace_search.
2. For the category, enter a string containing spaces.
3. Run your app and you should get the invalid signature response without the fix.

Basically, in general, if any of the parameters contain characters that will get URL encoded can cause this problem.

Comment 3 pslechta 2008-05-28 14:13:57 UTC
QA, please verify this fix till 09-Jun-2008, so it can be part of NB 6.1 patch 2.
Comment 4 Lukas Jungmann 2008-05-29 11:55:02 UTC
Comment 5 pslechta 2008-05-29 14:12:52 UTC
The fix has been ported into the release61_fixes repository.
Comment 6 Jaroslav Pospisil 2008-06-19 13:14:53 UTC
Verified in Patch 2.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo