Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support quoted scriptlet arguments #323

Merged
merged 1 commit into from
Nov 7, 2023
Merged

Support quoted scriptlet arguments #323

merged 1 commit into from
Nov 7, 2023

Conversation

antonok-edm
Copy link
Collaborator

No description provided.

@antonok-edm antonok-edm added the enhancement New feature or request label Nov 7, 2023
@antonok-edm antonok-edm self-assigned this Nov 7, 2023
@@ -70,7 +151,9 @@ impl ResourceStorage {
/// Given the contents of a `+js(...)` filter part, return a scriptlet string appropriate for
/// injection in a page.
pub fn get_scriptlet_resource(&self, scriptlet_args: &str, filter_permission: PermissionMask) -> Result<String, ScriptletResourceError> {
let scriptlet_args = parse_scriptlet_args(scriptlet_args);
// `unwrap` is safe because these are guaranteed valid at filter parsing.
let scriptlet_args = parse_scriptlet_args(scriptlet_args).unwrap();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reported by reviewdog 🐶
[semgrep] expect or unwrap called in function returning a Result

Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result


Cc @thypon @bcaller

@antonok-edm antonok-edm merged commit dd49b9b into master Nov 7, 2023
6 checks passed
@antonok-edm antonok-edm deleted the quoted-args branch November 7, 2023 23:24
@antonok-edm
Copy link
Collaborator Author

(closed #310)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants