Repository navigation
crt: request an explicit / path (blasthttp sends an empty path, which crt.sh rejects with 400) - #3428
Merged
liquidsec merged 3 commits intoSep 24, 2026
Conversation
… crt.sh rejects with 400
add_get_params("https://crt.sh", ...) yields https://crt.sh?q=...&output=json,
which has no path. blasthttp sends it as given, so the request line becomes
`GET ?q=...` and crt.sh's nginx answers 400 Bad Request on every query.
httpx (bbot 2.x) normalised the empty path to /.
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
bls-cla-bot Bot
added a commit
to blacklanternsecurity/CLA
that referenced
this pull request
Sep 10, 2026
Contributor
|
hi @wandering-walnut, good catch and thanks for the PR. Lets remove the comment and leave the documentation of this for the commit messages, other than that this should be good to go. I agree there should be more normalization to handle cases like this also, will open an issue for that. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #3428 +/- ##
=====================================
+ Coverage 90% 90% +1%
=====================================
Files 459 459
Lines 48523 48523
=====================================
+ Hits 43652 43653 +1
+ Misses 4871 4870 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
also fixing at blacklanternsecurity/blasthttp#112 |
liquidsec
approved these changes
Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On bbot 3.x, the
crtmodule fails every query withError parsing results for query "<domain>" (status code 400).Cause:
request_urlbuilds its URL withadd_get_params("https://crt.sh", params), which giveshttps://crt.sh?q=%25.<domain>&output=json. There's no path in that URL. blasthttp sends it exactly as given, so the request line isGET ?q=..., and crt.sh's nginx answers400 Bad Request. httpx (bbot 2.x) normalised an empty path to/, which is why this only appeared with bbot 3's client.With
web.debug, bbot 3.0.2 logsblasthttp request: GET https://crt.sh?q=%25.<domain>&output=json, and the response is nginx's 400.Reproduction, independent of bbot:
Change:
base_url = "https://crt.sh/"inbbot/modules/crt.py;test_module_crt.py's blasthttp mock.Tested: with this change applied to 3.0.2,
bbot -m crtagainst a live domain returns results again.Possible follow-up: a more general fix would be for
add_get_paramsor the blasthttp wrapper to normalise an empty path to/, since any otherbase_urlwithout a path would hit the same thing.