Bug 58698 - HTTP Authorization Manager cannot load an auth.txt it saved
Summary: HTTP Authorization Manager cannot load an auth.txt it saved
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.13
Hardware: PC All
: P2 minor (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-07 19:12 UTC by mike.palandra
Modified: 2015-12-12 15:37 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mike.palandra 2015-12-07 19:12:01 UTC
1)  Start JMeter GUI

2)  Add a HTTP Authorization Manager config element to the test plan, and select it

3)  Press "Add" button, and proceed to enter the following values for a single authorization:
Base URL:  http://jmeter.apache.org/
Username:  user
Password:  pass

4)  Press the "Save" button to create "auth.txt"

5)  Delete the authorization added in step 3

6)  Press the "Load" button, and select the file created in step 4

7)  Error message:  "One or more errors found when reading the Auth file - see the log file"

Relevant excerpt from log file:
"2015/12/07 13:14:18 ERROR - jmeter.protocol.http.control.AuthManager: Error parsing auth line: 'http://jmeter.apache.org/	user	pass			BASIC_DIGEST' "


Note:  if "auth.txt" is edited in a text editor such that only the (3) fields actually entered within JMeter are retained; i.e. Base URL, Username, and Password, then this modified auth.txt file will load successfully.
Comment 1 Felix Schumacher 2015-12-12 15:18:55 UTC
Date: Sat Dec 12 15:16:48 2015
New Revision: 1719699

URL: http://svn.apache.org/viewvc?rev=1719699&view=rev
Log:
Bug 58698: Correct parsing of auth-files in HTTP Authorization Manager.

Bugzilla Id: 58698

Added:
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/AuthManagerTest.java
Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java
    jmeter/trunk/xdocs/changes.xml
Comment 2 Felix Schumacher 2015-12-12 15:37:31 UTC
Date: Sat Dec 12 15:35:52 2015
New Revision: 1719702

URL: http://svn.apache.org/viewvc?rev=1719702&view=rev
Log:
Followup to r1719699

There was already a test case for AuthManager, so use that one.
Correct offset for length of splitted array, so that old auth infos can be read.

Bugzilla Id: 58698

Removed:
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/AuthManagerTest.java
Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestAuthManager.java