simplesamlphp / SAML-tracer

Browser extension for examining SAML messages
https://addons.mozilla.org/nl/firefox/addon/saml-tracer/
BSD 2-Clause "Simplified" License
141 stars 39 forks source link

fix request counting #64

Closed khlr closed 4 years ago

khlr commented 4 years ago

This pull request fixes two bugs which caused an incorrect hidden request count:

  1. Requests without responses haven't been counted correctly.
  2. "fakeRequests" led to incomprehensible counts.

Regarding 1: This can be very easily be reproduced by accessing any arbitrary non-existent ressource. E.g. http://www.non-existent-website.com/ SAML-tracer collects the GET and displays the request. Since there'll never be a response for this request, this entry will not get the isVisible property assigned. Entries without that property are shown in the upper pane. Everything fine so far. But unfortunately SAML-tracer counts this request as a hidden one due to the property being undefined:

image

Regarding 2: The webRequest-API implementation of Firefox issues fakeRequests in some situations which should be ignored by SAML-tracer. This can be reproduced by first opening a new tab (about:blank). Firefox may list some items with thumbnails on that new tab. E.g. some recently visited websites, recommended news and so on. Now click on http://www.non-existent-website.com/. The result: SAML-tracer traces the request to the non-existent website and some invisible fake requests...

image

jaimeperez commented 4 years ago

Merged! Thanks a lot @khlr!