-
Notifications
You must be signed in to change notification settings - Fork 35
Configurable viewport #73
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
Changes from all commits
5a9dc14
d13e764
fc57289
f4747f6
a581364
a214bcf
b12c7c7
7d491fe
fe4b7f3
209ffa9
8ff2300
792beee
99111f6
5358c43
613f0f9
2c71f0c
1e34150
6a7b560
513dcbb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,29 @@ CHROMIUM_FLAGS="${CHROMIUM_FLAGS:-$CHROMIUM_FLAGS_DEFAULT}" | |
| rm -rf .tmp/chromium | ||
| mkdir -p .tmp/chromium | ||
| FLAGS_FILE="$(pwd)/.tmp/chromium/flags" | ||
| echo "$CHROMIUM_FLAGS" > "$FLAGS_FILE" | ||
|
|
||
| # Convert space-separated flags to JSON array format, handling quoted strings | ||
| # Use eval to properly parse quoted strings (respects shell quoting) | ||
| if [ -n "$CHROMIUM_FLAGS" ]; then | ||
| eval "FLAGS_ARRAY=($CHROMIUM_FLAGS)" | ||
| else | ||
| FLAGS_ARRAY=() | ||
| fi | ||
|
|
||
| FLAGS_JSON='{"flags":[' | ||
| FIRST=true | ||
| for flag in "${FLAGS_ARRAY[@]}"; do | ||
| if [ -n "$flag" ]; then | ||
| if [ "$FIRST" = true ]; then | ||
| FLAGS_JSON+="\"$flag\"" | ||
| FIRST=false | ||
| else | ||
| FLAGS_JSON+=",\"$flag\"" | ||
| fi | ||
| fi | ||
| done | ||
| FLAGS_JSON+=']}' | ||
| echo "$FLAGS_JSON" > "$FLAGS_FILE" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Chromium Flag Parsing and JSON Formatting ErrorsThe new logic for converting Chromium flags to JSON has two issues. First, Additional Locations (1)There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Shell Code Injection via User-Controlled FlagsThe Additional Locations (1)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again, not user facing and this is fine There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: JSON Flag Parsing Fails on Special CharactersThe JSON generation for Chromium flags doesn't escape special characters within flag values. If a flag contains double quotes, backslashes, or other JSON special characters, the resulting JSON will be invalid. This could cause the downstream flag parsing system to fail or misinterpret flags. Additional Locations (1) |
||
|
|
||
| echo "flags file: $FLAGS_FILE" | ||
| cat "$FLAGS_FILE" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,32 @@ CHROMIUM_FLAGS="${CHROMIUM_FLAGS:-$chromium_flags_default}" | |
| rm -rf .tmp/chromium | ||
| mkdir -p .tmp/chromium | ||
| FLAGS_DIR=".tmp/chromium" | ||
| echo "$CHROMIUM_FLAGS" > "$FLAGS_DIR/flags" | ||
|
|
||
| # Convert space-separated flags to JSON array format, handling quoted strings | ||
| # Use eval to properly parse quoted strings (respects shell quoting) | ||
| if [ -n "$CHROMIUM_FLAGS" ]; then | ||
| eval "FLAGS_ARRAY=($CHROMIUM_FLAGS)" | ||
| else | ||
| FLAGS_ARRAY=() | ||
| fi | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Environment Variable Injection VulnerabilityThe use of Additional Locations (1)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that is fine. It is not for production use case There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Shell Injection via
|
||
|
|
||
| FLAGS_JSON='{"flags":[' | ||
| FIRST=true | ||
| for flag in "${FLAGS_ARRAY[@]}"; do | ||
| if [ -n "$flag" ]; then | ||
| if [ "$FIRST" = true ]; then | ||
| FLAGS_JSON+="\"$flag\"" | ||
| FIRST=false | ||
| else | ||
| FLAGS_JSON+=",\"$flag\"" | ||
| fi | ||
| fi | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Shell Command Injection via
|
||
| done | ||
| FLAGS_JSON+=']}' | ||
| echo "$FLAGS_JSON" > "$FLAGS_DIR/flags" | ||
cursor[bot] marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: JSON Parsing Fails on Quoted FlagsThe new JSON flag conversion logic in |
||
|
|
||
| echo "flags file: $FLAGS_DIR/flags" | ||
| cat "$FLAGS_DIR/flags" | ||
|
|
||
| # Re-create the volume from scratch every run | ||
| kraft cloud volume rm "$volume_name" || true | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need this for xrandr