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

fix: no more dataurls & localhost links #900

Merged
merged 4 commits into from
Dec 2, 2024

Conversation

NeonGamerBot-QK
Copy link
Member

@NeonGamerBot-QK NeonGamerBot-QK commented Dec 2, 2024

Fixes #899 #901
Closes #899
Closes #901
this also makes it so only http(s) urls work

Copy link

vercel bot commented Dec 2, 2024

@NeonGamerBot-QK is attempting to deploy a commit to the Hack Club Team on Vercel.

A member of the Team first needs to authorize it.

@NeonGamerBot-QK NeonGamerBot-QK changed the title fix: no more dataurls fix: no more dataurls & localhost links Dec 2, 2024
Copy link

vercel bot commented Dec 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
high-seas ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 2, 2024 2:52pm

@maxwofford
Copy link
Member

Lol, love this. I'll merge it after testing it out!

@malted
Copy link
Member

malted commented Dec 2, 2024

Wait up!

@malted
Copy link
Member

malted commented Dec 2, 2024

Thank you sm for this! But merging this will close #899 which also mentions image resolution.

Nvm for now - will spin up another issue.

Tracking resolution fix in #903

Comment on lines +25 to +31
value: JSON.stringify(
ships.map((s) => {
if (s.screenshotUrl.startsWith('data:'))
s.screenshotUrl = `replace_me_with_a_non_dataencoded_url_plz`
return s
}),
),
Copy link
Member

Choose a reason for hiding this comment

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

Is this to fix data that is currently incorrect in the wild?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes! currently it soft locks users (aka vercel 500) which means they cant ship projects. ofc i can remove this and you guys will have to unlock them manually ;-;

Copy link
Member

@malted malted Dec 2, 2024

Choose a reason for hiding this comment

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

Ok amazing - tysm for this fix!

@maxwofford
Copy link
Member

@malted I'll leave this for you to merge then!

@malted malted merged commit a5fcbfd into hackclub:main Dec 2, 2024
3 checks passed
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.

Users allowed to submit a localhost URL as a project demo Wrong image links allowed
3 participants