Form-based Authentication bug
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 15.8k
- Forks
- 2.6k
- Avg merge
- 13h 16m
- Merged PRs (30d)
- 17
Description
I have tried to test our company's site using Form-based Authentication, but it did not work.
As I investigated in history tab on Tags "Authentication, sometimes its method is GET, sometimes POST.
Seems ZAP use the method of the last request which is the same as Form-based Authentication address.
It will work fine if method is POST.
I guess the problem is the link to log in, log out, and home using the same address but different method and parameters.
i.e. (addresses are just examples)
log in request :
method => POST
address => www.example.com
param => username=user&password=pass&login=yes
log out request :
method => POST
address => www.example.com
param => logout=yes
home request :
method => GET
address => www.example.com
param =>
I have tested again with these steps.
Case 1 :
- log in manually (method POST)
- set the request as Form-based Authentication(include setting user/pass and forced user)
- log out (method POST)
- enable forced user
- refresh page (home request). the result is that it does log in automatically (Success)
- Tags Authentication in history tab is method POST.
Case 2 :
- log in manually (method POST)
- set the request as Form-based Authentication(include setting user/pass and forced user)
- log out (method POST)
- *** refresh the page first (home request - method GET)
- enable forced user
- refresh page (home request). the result is that it does not log in automatically (Fail)
- Tags Authentication in history tab is method GET.
- It is always fail if I do GET request before ZAP use Form-based Authentication.
With this problem, I cannot use Active scan, spider, and AJAX spider completely because sometimes it's fail on Form-based Authentication step. So it always redirect to log-in page.
ref : https://groups.google.com/d/msg/zaproxy-users/Ea4NYVDYjjQ/I1PdTaIfSUoJ
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two Form-based Authentication cases described in the issue, using requests with the same URL but different GET and POST methods. Done means authentication remains successful after a GET request and Active scan, spider, and AJAX spider do not redirect to the login page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authentication, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100