serenity icon indicating copy to clipboard operation
serenity copied to clipboard

Ladybird: Trying to navigate to a non-existent local path replaces the URL with `:`

Open AtkinsSJ opened this issue 1 year ago • 2 comments

You can enter a file path with a leading / in the location box and Ladybird automatically inserts the file:// scheme, but this only works if the file path exists. If it does not, we instead navigate to :, replacing whatever the user had typed. We should show a 404 page instead.

AtkinsSJ avatar Dec 28 '23 13:12 AtkinsSJ

Hey, I'm with the University of Utah looking at ladybird for our final project in Web Browser Internals. My team is interested in looking at fixing this issue - Does anyone have further thoughts on this for where to start with it/is it a good beginner issue?

raklan avatar Apr 11 '24 16:04 raklan

Hi there @raklan!

You never know for sure with bugs, but this does look like a reasonable one for a beginner.

Each Ladybird app (or "chrome") has some kind of widget for the URL box, so I'd start there. For example in the Serenity chrome, it's URLBox. Whenever the URL changes we rehighlight it, which looks very suspicious: https://github.com/SerenityOS/serenity/blob/master/Userland%2FApplications%2FBrowser%2FURLBox.cpp#L59

See how you get on! Feel free to comment here or in one of the Discord channels if you get stuck or confused.

AtkinsSJ avatar Apr 12 '24 07:04 AtkinsSJ