fix(security): 2 improvements across 2 files#2560
Conversation
- Security: Unsafe URL construction in profanityAPI extension - Security: Unvalidated user input in fetch extension Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
- Security: Unsafe URL construction in profanityAPI extension - Security: Unvalidated user input in fetch extension Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
|
Hallucinated slop is not welcome here. |
|
Good to know |
|
To be clear, I do run LLM security checks on a lot of things in here. We've found and fixed things that way. But neither of these are even remotely real issues, and it's clear that no human even looked at it before you created this. The profanity extension is not listed on our website and probably not used by anyone. The "vulnerability" you report is that the project can put arbitrary text at the URL. That's nonsense. The project can also just use the fetch extension to do the same thing. Is it a bug to not be escaping there? Maybe. But it's a niche bug in an extension nobody uses so whatever. Your proposed change to the fetch extension is comical. Scratch.fetch already does these checks for you. And your proposed change breaks relative path fetches as used by some packaged projects. |
|
PR author was blocked for 7 days. |
|
Changing block to permanent because PR author's whole deal is sending slop out to random github repos. |
|
Good to know |
Summary
fix(security): 2 improvements across 2 files
Problem
Severity:
Medium| File:extensions/TheShovel/profanityAPI.js:L33The profanityAPI extension constructs a URL by directly concatenating user-controlled input (TEXT) into a URL without URL encoding. This could lead to URL injection attacks, allowing manipulation of the request parameters sent to purgomalum.com. While the impact is limited to the external API, it could cause unexpected behavior or API abuse.
Solution
Use URL encoding for the text parameter, e.g.,
encodeURIComponent(TEXT)when constructing the URL.Changes
extensions/TheShovel/profanityAPI.js(modified)extensions/fetch.js(modified)