Skip to content

Reduce false positives and number of requests sent#16

Merged
luh2 merged 4 commits intoluh2:masterfrom
soffensive:update-extensions
Dec 17, 2018
Merged

Reduce false positives and number of requests sent#16
luh2 merged 4 commits intoluh2:masterfrom
soffensive:update-extensions

Conversation

@soffensive
Copy link

  1. Reduce false positives by using a different approach for detecting JavaScript extensions. The current way will, for example, detect "jspa" as a script file. Another approach would be a more sophisticated way, for example, by rating/weighing the different criteria (content-type, file extension, mime-type ...)

  2. Reduce number of requests sent by the extension by examining whether there is any authentication information in the base request at all.

@soffensive
Copy link
Author

I just noticed for number 2) there is already a method hasAuthenticationCharacteristic, but it does not seem to work.

@soffensive
Copy link
Author

soffensive commented Dec 15, 2018

It seems there is an incorrect not that will cause the hasAuthenticationCharacteristic to always return true:

return any(h for h in self.ifields if h not in str(hfields).lower())

This coding style makes it hard to discover bugs / determine the actual behaviour since the any() is error-prone and there are too many statements in a single line

@luh2 luh2 merged commit 3e469af into luh2:master Dec 17, 2018
@luh2
Copy link
Owner

luh2 commented Dec 17, 2018

Awesome pull request as usual! Thanks. It's merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants