intruxxer / zaproxy

Automatically exported from code.google.com/p/zaproxy
0 stars 0 forks source link

Default ports 80 and 443 are appended to sites in site tree #533

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Proxy to any HTTP or HTTPS site (http://host/ or https://host/)
2. Select to Force Browse site

What is the expected output? What do you see instead?

Expected: Directories found by Forced Browse are added to the site tree, either 
to http://host/ or https://host/
Actual: Directories are added to new http://host:80/ or https://host:443/ sites.

---

The solution might be to treat sites/hosts starting with http or https and 
ending without port as ending with port 80 or 443 by default.

So, when a new site is added to the tree, ports 80 or 443 should be ignored, 
same case for finding, updating and removing nodes.

I guess updating org.parosproxy.paros.model.SiteMap accordingly will solve the 
issue? Attached is a diff with proposed changes

---

Attached is a diff that might resolve the issue.

What do you think?

Cheers,
Sergey

Original issue reported on code.google.com by serge....@gmail.com on 22 Feb 2013 at 8:57

Attachments:

GoogleCodeExporter commented 9 years ago
Hi.

Yes, it will fix the issue.

Some comments regarding the changes:
 - Better to check if the port is the default port for the used scheme instead of only checking if it's a default port (of any scheme). The port 80 should be shown when it's used for scheme "https" (the same for port 443 but with scheme "http").
 - Consider to extract a method from the creation of the "host" representation.

Best regards.

Original comment by THC...@gmail.com on 25 Feb 2013 at 4:56

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for testing) I do agree with both point, so I'll update the code 
according to your suggestions and will commit it to trunk.

Cheers,
Sergey

Original comment by serge....@gmail.com on 25 Feb 2013 at 8:32

GoogleCodeExporter commented 9 years ago
Hi.

OK. Sounds good to me.

Best regards.

Original comment by THC...@gmail.com on 25 Feb 2013 at 5:39

GoogleCodeExporter commented 9 years ago
Committed changes: 

https://code.google.com/p/zaproxy/source/detail?r=2921

Original comment by serge....@gmail.com on 26 Feb 2013 at 1:27

GoogleCodeExporter commented 9 years ago

Original comment by serge....@gmail.com on 27 Feb 2013 at 11:38

GoogleCodeExporter commented 9 years ago

Original comment by psii...@gmail.com on 4 Mar 2013 at 9:16

GoogleCodeExporter commented 9 years ago
The fix doesn't properly handle non-80 and non-443 ports, treating them like 
default ones for specified protocol.

Original comment by serge....@gmail.com on 11 Mar 2013 at 1:44

GoogleCodeExporter commented 9 years ago
Committed:
https://code.google.com/p/zaproxy/source/detail?r=2964

Original comment by serge....@gmail.com on 11 Mar 2013 at 1:47

GoogleCodeExporter commented 9 years ago
Fixed in 2.1.0

Original comment by psii...@gmail.com on 18 Apr 2013 at 9:49