EthanLipnik / OpenSesame

Native and encrypted password manager for iOS and macOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"https://" automatically added might result in websites not working

rainloreley opened this issue · comments

https://github.com/OpenSesameManager/OpenSesame/blob/80db301ef9e76c026389c58b39cbb75faf59146b/Shared/Views/AccountView/AccountView%2BContent.swift#L65-L66

When you click on "Go to website", the app takes the domain entered by the user and prefixes "https://".
This is probably not ideal because of two cases (I can think of right now):

  1. some sites might not support https. While this is generally bad, https isn't necessarily needed for local/internal websites. This might result in the site not being reachable because it doesn't have https and can't respond.

  2. If the user added the url scheme to the "Website" field when adding a new account to the app (or possibly importing it from somewhere else?), the app/the browser can't open the site. example:

User input: https://google.com
Opened url: https://https://google.com

Two solutions are:

  1. Check the url string for an existing scheme and add http/https if needed (only for issue 2).
  2. don't add an url scheme at all (for issue 1 + 2; or add it when creating a new account, but then check the user input as described in solution 1)

edit (because it's related to the url scheme thing): The name of the account is capitalized, which looks a bit weird when there's already a scheme in the url:

IMG_B9DB656A3A31-1