Skip to content

[infra] Update uploadSnapshot.js #356

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

Merged
merged 2 commits into from
Jun 6, 2025
Merged

[infra] Update uploadSnapshot.js #356

merged 2 commits into from
Jun 6, 2025

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented Jun 6, 2025

Sanitize tag values before uploading

@Janpot Janpot requested review from michaldudak and a team June 6, 2025 09:47
@Janpot Janpot marked this pull request as ready for review June 6, 2025 09:49
Comment on lines 23 to 24
let safe = str.replace(/[^a-zA-Z0-9 +-=.:/@]/g, '_');
safe = safe.replace(/_+/g, '_'); // Replace multiple underscores with single
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't this be enough?

Suggested change
let safe = str.replace(/[^a-zA-Z0-9 +-=.:/@]/g, '_');
safe = safe.replace(/_+/g, '_'); // Replace multiple underscores with single
const safe = str.replace(/[^a-zA-Z0-9 +-=.:/@]+/g, '_');

@Janpot Janpot enabled auto-merge (squash) June 6, 2025 10:05
@Janpot Janpot merged commit 3b36a4d into master Jun 6, 2025
7 checks passed
@Janpot Janpot deleted the tagging branch June 6, 2025 10:07
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