From 0b3d7fbde43882f833bec32d129fcfb488e7e23f Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 1 Oct 2021 10:19:47 -0400 Subject: [PATCH] Add honeypot for user and form creation. Fixes #433 (#435) --- package.json | 2 +- src/assets/css/main.css | 4 ++++ src/shared/components/home/signup.tsx | 20 ++++++++++++++++++-- src/shared/components/post/post-form.tsx | 15 +++++++++++++++ yarn.lock | 8 ++++---- 5 files changed, 42 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 65e11446..77ee390e 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "husky": "^7.0.2", "import-sort-style-module": "^6.0.0", "iso-639-1": "^2.1.9", - "lemmy-js-client": "0.13.0", + "lemmy-js-client": "0.13.1-rc.1", "lint-staged": "^11.0.1", "mini-css-extract-plugin": "^2.3.0", "node-fetch": "^2.6.1", diff --git a/src/assets/css/main.css b/src/assets/css/main.css index 2e6c7cb3..641b7bee 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -364,3 +364,7 @@ br.big { .tribute-container .menu-highlighted { font-weight: bold; } + +.honeypot { + display:none !important; +} diff --git a/src/shared/components/home/signup.tsx b/src/shared/components/home/signup.tsx index 722f644f..1452ba07 100644 --- a/src/shared/components/home/signup.tsx +++ b/src/shared/components/home/signup.tsx @@ -1,3 +1,5 @@ +import { Options, passwordStrength } from "check-password-strength"; +import { I18nKeys } from "i18next"; import { Component, linkEvent } from "inferno"; import { T } from "inferno-i18next-dess"; import { @@ -10,7 +12,6 @@ import { } from "lemmy-js-client"; import { Subscription } from "rxjs"; import { i18n } from "../../i18next"; -import { Options, passwordStrength } from "check-password-strength"; import { UserService, WebSocketService } from "../../services"; import { authField, @@ -26,7 +27,6 @@ import { } from "../../utils"; import { HtmlTags } from "../common/html-tags"; import { Icon, Spinner } from "../common/icon"; -import {I18nKeys} from "i18next"; const passwordStrengthOptions: Options = [ { @@ -76,6 +76,7 @@ export class Signup extends Component { show_nsfw: false, captcha_uuid: undefined, captcha_answer: undefined, + honeypot: undefined, }, registerLoading: false, captcha: undefined, @@ -272,6 +273,16 @@ export class Signup extends Component { )} +
)} +