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
F2114388: D6739.id22614.diff
Wed, Jun 26, 5:34 AM
F2114272: D6739.id22643.diff
Wed, Jun 26, 5:21 AM
F2110683: D6739.id22614.diff
Tue, Jun 25, 8:41 PM
Unknown Object (File)
Sat, Jun 22, 1:20 PM
Unknown Object (File)
Fri, Jun 21, 4:06 PM
Unknown Object (File)
Mon, Jun 17, 11:07 PM
Unknown Object (File)
Mon, Jun 17, 11:07 PM
Unknown Object (File)
Mon, Jun 17, 5:54 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
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...