ciccionamente / WeExpire

WeExpire is the first opensource tool for creating emergency notes that can be read by your trusted contacts only after your death or if you are seriously injured.
https://weexpire.org
GNU General Public License v3.0
113 stars 5 forks source link

[question]: why limiting the note size to 1000 characters? #4

Closed eze-kiel closed 1 year ago

eze-kiel commented 1 year ago

Where does the 1000 chars max limit come from?

It prevents users to share things such as private SSH or GPG keys, long passwords lists etc.

ciccionamente commented 1 year ago

The entire emergency note (1000 characters max) and its additional settings (inactivity time, email addresses, expiry date, etc) aren't stored in a database but they are converted into a URL that contains a long and encrypted parameter (characters of the emergency note + characters of the additional settings). This URL is then converted into the QR code.

Browsers, servers and CDNs have length limitations which are not the same. For instance, some of the browsers like Safari and Firefox can handle very long URLs (64,000 characters) but other browsers like Edge can handle very small URLs (2,083 characters). Here you can find more details.

So, in a nutshell, if the emergency note is not limited (at least for now) to 1000 characters there is a risk that it cannot be accessed by every browser. If in the future browsers like Edge will increase their URL limit, then we can increase the limit in the emergency note too.

eze-kiel commented 1 year ago

I didn't know that browsers have different limitations! Thanks for your explanation!