Page MenuHomePhabricator

[lib] Limit maximum chat name to prevent error
ClosedPublic

Authored by kuba on Feb 15 2023, 2:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 24, 3:15 AM
Unknown Object (File)
Fri, May 17, 11:02 PM
Unknown Object (File)
Fri, May 10, 2:23 PM
Unknown Object (File)
Apr 14 2024, 1:58 PM
Unknown Object (File)
Apr 14 2024, 1:58 PM
Unknown Object (File)
Apr 14 2024, 1:58 PM
Unknown Object (File)
Apr 14 2024, 1:54 PM
Unknown Object (File)
Mar 25 2024, 2:04 PM
Subscribers

Details

Summary

When you set too long a chat name (>191 characters) it resulted in a server error (SQL name field limit).
Added limits to GUI: native and web. Validating the result on the keyserver before it reaches SQL.

Original issue

Test Plan
  • Tested on iOS, Android, and the web app.
  • Now you can't input more characters than the limit set.
  • If you do (older app version) the server throws error (before it reaches SQL).

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kuba edited the test plan for this revision. (Show Details)
kuba added reviewers: inka, michal.

Looks good to me, but feel free to assign any blocking reviewers if you want.

This revision is now accepted and ready to land.Feb 15 2023, 4:49 AM
web/modals/input.react.js
8–23 ↗(On Diff #22614)

I'm a little confused about BaseInputProps vs. InputProps. I did some research and it looks like this is only used for convenience of defining Props in PasswordInput, so I guess it's fine...