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

Long URLs cause crash #4

Closed
kirillt opened this issue Jun 11, 2022 · 1 comment
Closed

Long URLs cause crash #4

kirillt opened this issue Jun 11, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@kirillt
Copy link
Member

kirillt commented Jun 11, 2022

Because URLs are pasted into filename.

Example: adding https://2501babe.github.io/posts/solana101.html?accessToken=eyJhbGciOiJIUzI1NiIsImtpZCI6ImRlZmF1bHQiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiJhY2Nlc3NfcmVzb3VyY2UiLCJleHAiOjE2NDQ0ODUzOTUsImciOiI4QXcyeDJNQTJrUVVYdnYwIiwiaWF0IjoxNjQ0NDg1MDk1LCJ1c2VySWQiOi0xNzQ4NDU1ODc5fQ.poTnBB48mQjZhiun-HoSCPNG5pXLBoup42GxUMuSiMI leads to

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 36, kind: InvalidFilename, message: "File name too long" }', core/src/base/link.rs:31:44
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

We should encode URL with some hash function or BASE 32. We can use UUID or timestamps as well but then we need to check duplicates.

@kirillt
Copy link
Member Author

kirillt commented Jul 2, 2022

Fixed in #11

@kirillt kirillt closed this as completed Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant