manifold/common
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
..
envs Amplitude (#505) 2022-06-14 22:00:36 -05:00
util Clean up unclean user names (#543) 2022-06-18 14:31:39 -07:00
.eslintrc.js Change eslint unused var to 'warn' instead of 'error' 2022-06-15 14:48:12 -05:00
.gitignore Add package.json to common directory, and lodash dependency 2022-02-01 12:59:51 -06:00
add-liquidity.ts Refactor contract typing to be more concise and more correct (#355) 2022-05-31 19:42:35 -07:00
answer.ts Revert "Represent DB avatar URLs as non-null (#128)" 2022-05-06 14:29:15 -04:00
antes.ts Refactor contract typing to be more concise and more correct (#355) 2022-05-31 19:42:35 -07:00
bet.ts Numeric range markets!! (#146) 2022-05-19 12:42:03 -05:00
calculate-cpmm.ts Liquidity withdrawal (#457) 2022-06-08 13:00:49 -05:00
calculate-dpm.ts dpm: don't use weightedShareTotal 2022-06-08 16:18:00 -05:00
calculate-fixed-payouts.ts Refactor contract typing to be more concise and more correct (#355) 2022-05-31 19:42:35 -07:00
calculate.ts Refactor contract typing to be more concise and more correct (#355) 2022-05-31 19:42:35 -07:00
categories.ts Update categories: Add Culture, health => Covid, rearrange 2022-05-15 23:45:02 -04:00
charity.ts Add ACLU charity 2022-06-11 18:06:44 -07:00
comment.ts Single threaded comments (#175) 2022-05-11 15:11:46 -06:00
contract.ts Revert "Automated market resolution (#404)" 2022-06-14 23:31:20 -05:00
feed.ts Categories (#132) 2022-05-12 10:07:10 -05:00
fees.ts eliminate platform, liquidty fees 2022-06-16 12:46:34 -05:00
fold.ts Match lowercase tags for folds 2022-02-01 12:29:14 -06:00
liquidity-provision.ts Cfmm (#64) 2022-03-15 17:27:51 -05:00
new-bet.ts Refactor contract typing to be more concise and more correct (#355) 2022-05-31 19:42:35 -07:00
new-contract.ts Revert "Automated market resolution (#404)" 2022-06-14 23:31:20 -05:00
notification.ts Notifications for liquidity proiders/provisions (#478) 2022-06-10 16:48:28 -06:00
numeric-constants.ts Numeric range markets!! (#146) 2022-05-19 12:42:03 -05:00
package.json Add yarn verify script (#378) 2022-06-03 15:10:14 -07:00
payouts-dpm.ts Refactor contract typing to be more concise and more correct (#355) 2022-05-31 19:42:35 -07:00
payouts-fixed.ts Refactor contract typing to be more concise and more correct (#355) 2022-05-31 19:42:35 -07:00
payouts.ts Refactor contract typing to be more concise and more correct (#355) 2022-05-31 19:42:35 -07:00
quadratic-funding.ts Add quadratic matching to Manifold for Charity (#486) 2022-06-13 20:53:29 -07:00
recommended-contracts.ts Change lodash stuff so that it can be tree-shaken out of build (#233) 2022-05-22 01:36:05 -07:00
scoring.ts Refactor contract typing to be more concise and more correct (#355) 2022-05-31 19:42:35 -07:00
sell-bet.ts Properly fill probs on DPMM bets (#480) 2022-06-10 15:15:52 -06:00
tracking.ts Track latency of feed and portfolio page. 2022-04-21 01:00:08 -05:00
tsconfig.json Add tsconfig, more linting to common package (#324) 2022-05-25 17:12:36 -07:00
txn.ts Comment tips (attempt 2) (#539) 2022-06-17 22:28:16 -05:00
user.ts Revert "Revert "Notification detail, grouping, and settings control [wip] (#403)"" 2022-06-06 11:36:59 -06:00
yarn.lock Add package.json to common directory, and lodash dependency 2022-02-01 12:59:51 -06:00