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, Nov 1, 9:44 PM
Unknown Object (File)
Tue, Oct 22, 12:30 PM
Unknown Object (File)
Tue, Oct 22, 12:30 PM
Unknown Object (File)
Tue, Oct 22, 3:05 AM
Unknown Object (File)
Mon, Oct 21, 3:58 PM
Unknown Object (File)
Fri, Oct 18, 5:19 PM
Unknown Object (File)
Sep 22 2024, 10:01 AM
Unknown Object (File)
Sep 22 2024, 5:34 AM
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...