HTTP authorization causes ArrayIndexOutOfBoundsException

Bug #609340 reported by Michael Boyd
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
Status tracked in 1.0
1.0
Fix Committed
Low
Erwan Loisant
1.1
Fix Committed
Low
Unassigned

Bug Description

Http class, _init() method.

Change this...

                String decodedData = new String(Codec.decodeBASE64(data));
                user = decodedData.split(":")[0];
                password = decodedData.split(":").length > 1 ? decodedData.split(":")[1] : null;

To this...

                String[] decodedData = new String(Codec.decodeBASE64(data)).split(":");
                user = decodedData.length > 0 ? decodedData[0] : null;
                password = decodedData.length > 1 ? decodedData[1] : null;

Tags: http-auth
Erwan Loisant (eloisant)
Changed in play:
status: New → In Progress
assignee: nobody → Erwan Loisant (eloisant)
Revision history for this message
Erwan Loisant (eloisant) wrote :

That's fixed, thanks for the report.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.