Joe Fabisevich :verified: on Nostr: Did you know that on iOS and macOS URL will take the string `view-source:` and ...
Did you know that on iOS and macOS URL will take the string `view-source:
https://xyz.com` and properly say this is an invalid URL when using URL(string: "view-source:
https://xyz.com";), but on Linux it will say, oh that's fine, totally valid URL?
Well that's the story of how I fixed a bug where a user was able to save an invalid URL into Plinky's database last night — fixed with an extra layer of validation and some tests.
Published at
2024-05-22 23:48:13Event JSON
{
"id": "a3b189caf81eda91ec11a713ba83422d15483e0963e1b9f1475238ec2f9c98e6",
"pubkey": "68179f1d1cff04f46ba8ea4f77f9fd007e26822dad6e3c0b507267b9f405db5e",
"created_at": 1716421693,
"kind": 1,
"tags": [
[
"proxy",
"https://macaw.social/users/mergesort/statuses/112487412103706427",
"activitypub"
]
],
"content": "Did you know that on iOS and macOS URL will take the string `view-source:https://xyz.com` and properly say this is an invalid URL when using URL(string: \"view-source:https://xyz.com\"), but on Linux it will say, oh that's fine, totally valid URL?\n\nWell that's the story of how I fixed a bug where a user was able to save an invalid URL into Plinky's database last night — fixed with an extra layer of validation and some tests.",
"sig": "a7b462191e53e877107a2af82cff8f09796ec83c39c8091922224665d02cf4be1143e2dfd91a8f460a87bc399f7b4befe993d1df7243a55cc74c3c7afae601a8"
}