writefreely/writefreely-swiftui-multiplatform

Make server URL validation more robust

Closed this issue · 1 comments

Leaving a trailing slash in the server URL will cause login to fail; it shouldn't.

Extending the scope of this issue per this PR comment:

Looking at this, I'm just thinking of different edge cases and wondering if there's any way we can have a more friendly error message when someone gives a bad hostname (e.g. "writefreely" or "write.freely" or "write.as//" or "write.as/matt"). Do you think that'd be pretty involved?

I'm just thinking about how we make this as robust as possible, and handle a wide variety of invalid inputs, rather than just this one particular case.