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
F2024450: D6739.diff
Mon, Jun 17, 5:54 AM
Unknown Object (File)
Thu, Jun 13, 11:02 PM
Unknown Object (File)
Thu, Jun 13, 11:02 PM
Unknown Object (File)
Thu, Jun 13, 11:02 PM
Unknown Object (File)
Sun, Jun 2, 5:58 PM
Unknown Object (File)
Fri, May 24, 3:15 AM
Unknown Object (File)
May 17 2024, 11:02 PM
Unknown Object (File)
May 10 2024, 2:23 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
Branch
kuba/long-chat-title
Lint
No Lint Coverage
Unit
No Test Coverage

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

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...