manifold/common/util
Marshall Polaris 1075fec53f
Clean up unclean user names (#543)
* Clean the user's display name on update.

The user's display name should always be clean (see for example
functions/src/create-user.ts). However, change-user-info.ts does not
enforce this, thus potentially allowing a malicious user to change their
name to something that doesn't satisfy the rules for clean display
names.

Note: this cannot happen currently because all callers (in profile.tsx)
clean the name. However, doing it here is good defense in depth
(similar to how the userName is cleaned).

* Update display name max length to 30

* Add a script to hunt down too-long display names

* Make util.isProd a function

* Don't access admin.firestore() on top level of utils.ts

Co-authored-by: Jonas Wagner <ltlygwayh@gmail.com>
2022-06-18 14:31:39 -07:00
..
array.ts Embed market: dynamically adjust graph height 2022-03-24 12:03:17 -05:00
clean-username.ts Clean up unclean user names (#543) 2022-06-18 14:31:39 -07:00
format.ts show 2 decimal places for fees 2022-06-17 16:28:25 -05:00
math.ts Tweaks to stats page 2022-06-14 10:27:52 -05:00
object.ts Liquidity withdrawal (#457) 2022-06-08 13:00:49 -05:00
parse.ts Enforce max question length, description length, and tag length. 2022-03-09 11:08:57 -06:00
promise.ts Fix leaderboard out of memory error with batchedWaitAll instead of Promise.all 2022-03-07 13:45:56 -08:00
random.ts Add tsconfig, more linting to common package (#324) 2022-05-25 17:12:36 -07:00
slugify.ts formatting 2022-01-10 17:52:03 -06:00
time.ts Add weekly activiation rate 2022-04-19 01:47:58 -05:00