This commit is contained in:
2021-03-22 15:59:05 +01:00
parent dd27483b16
commit 2ee7f650db
46 changed files with 5636 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
// @ts-check
/**
* @typedef {import('../types') }
*/
var utils = require("../lib/utils")
;(function () {
if (utils.isPublicToken(context)) {
// js captcha
var checksum = context.request().query("cs")
var email = context.data.email
if (!email || (email.length * 1000).toString(16) + "x" !== checksum) {
throw {
status: 403,
error: "forbidden data",
}
}
}
/** @type {import('../types').HookResponse} */
// @ts-ignore
var response = null
return response
})()