Bug 1235616 - Parsing username works incorrectly in LdapExtLoginModule
Summary: Parsing username works incorrectly in LdapExtLoginModule
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Security
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Ivo Studensky
QA Contact: Ondrej Lukas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-25 10:27 UTC by Ondrej Lukas
Modified: 2017-03-27 13:51 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-25 10:48:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBEAP-364 0 Blocker Closed Parsing username works incorrectly in LdapExtLoginModule 2017-08-21 06:16:12 UTC

Internal Links: 1434171

Description Ondrej Lukas 2015-06-25 10:27:47 UTC
Option parseUsername from LdapExtLoginModule works with usernameBeginString and usernameEndString which using in code is wrongly implemented in LdapExtLoginModule getUsername() method[1]. This method contains several issues related to this parsing:

1) Even if value of usernameBeginString is not found in username then first part of username with length usernameBeginString.length()-1 is removed.
2) Everything what is in username before first occurrence of usernameBeginString is removed. IMHO usernameBeginString should be first part of username and only then it should be removed.
3) End index of substring from username is obtained from first occurrence of usernameEndString value. IMHO usernameEndString should be last occurrence in username and also it should be end of username and only then it should be removed.

[1] https://github.com/picketbox/picketbox/blob/master/security-jboss-sx/jbosssx/src/main/java/org/jboss/security/auth/spi/LdapExtLoginModule.java#L946

Comment 2 JBoss JIRA Server 2015-08-18 06:41:46 UTC
Bartosz Baranowski <bbaranow> updated the status of jira JBEAP-364 to Coding In Progress

Comment 3 JBoss JIRA Server 2015-08-18 06:42:29 UTC
Bartosz Baranowski <bbaranow> updated the status of jira JBEAP-364 to Open

Comment 4 JBoss JIRA Server 2016-02-05 10:50:00 UTC
Bartosz Baranowski <bbaranow> updated the status of jira JBEAP-364 to Coding In Progress

Comment 5 JBoss JIRA Server 2016-02-05 10:50:18 UTC
Bartosz Baranowski <bbaranow> updated the status of jira JBEAP-364 to Open

Comment 6 JBoss JIRA Server 2016-02-05 10:52:12 UTC
Bartosz Baranowski <bbaranow> updated the status of jira JBEAP-364 to Resolved

Comment 7 JBoss JIRA Server 2016-02-08 11:13:37 UTC
Darran Lofthouse <darran.lofthouse> updated the status of jira JBEAP-364 to Reopened

Comment 8 JBoss JIRA Server 2016-02-09 11:52:19 UTC
Ondrej Lukas <olukas> updated the status of jira JBEAP-364 to Reopened

Comment 9 JBoss JIRA Server 2016-06-14 11:40:20 UTC
Jiri Pallich <jpallich> updated the status of jira JBEAP-364 to Closed


Note You need to log in before you can comment on or make changes to this bug.