Issue Details (XML | Word | Printable)

Key: GDS-561
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Franck Wolff
Reporter: Todd Byrne
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
GraniteDS

AbstractSecurityService.decodeBase64Credentials Long passwords don't get decoded correctly

Created: 12/Nov/09 05:53 AM   Updated: 12/Nov/09 01:59 PM   Resolved: 12/Nov/09 01:59 PM
Component/s: Security, Spring services
Affects Version/s: 2.0.0_SP1
Fix Version/s: 2.1.0_RC2

File Attachments: 1. Java Source File BugFinder.java (0.9 kB) 12/Nov/09 05:53 AM - Todd Byrne

Environment: Vista, Java 1.6, Flex 3.3


 Description  « Hide
Line 50 of AbstractSecurityService.decodeBase64Credentials calls fastDecode which doesn't like the lone \n that flex encodes in the login information.

Quick fix is to change it from fastDecode to decode.
Not so easy fix change fastDecode to allow just a \n instead of \r\n

I tested this with apache.commons and it decodes the string correctly.

Not sure why flex isn't following the spec on base64 encoding but adobe does weird things.



Flex Side:

user="test";
password="5555555555555555555555555555555555555555555555555555555";

context.identity.login(user,password,LoginInfoHandler,LoginInfoErrorHandler);

I attached an java program that shows the string from the debugger and runs it through apache.commons decoder and granite fastDecoder, and normal granite decoder.

Let me know if you need anything else thanks!


Franck Wolff added a comment - 12/Nov/09 01:59 PM
Fixed (use decode instaed of decodeFast).