This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 134352

Summary: Facebook and Flickr support generate incorrect signatures
Product: webservices Reporter: Peter Liu <petertliu>
Component: ManagerAssignee: Peter Liu <petertliu>
Status: VERIFIED FIXED    
Severity: blocker CC: sustaining
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

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.

http://hg.netbeans.org/main/rev/c5a58b0104ea

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
v.
Comment 5 pslechta 2008-05-29 14:12:52 UTC
The fix has been ported into the release61_fixes repository.

http://hg.netbeans.org/release61_fixes/rev/9aaa9ce8a100
Comment 6 Jaroslav Pospisil 2008-06-19 13:14:53 UTC
Verified in Patch 2.