Repository navigation
Spam protection and API keys for MSK Paste and MSK Shortener - #66
Merged
Merged
Conversation
Creating through the API now needs a key, the web form runs Cloudflare Turnstile and further spam checks, and both tools turn down certain content (paste: encoded files, link spam, repeats; shortener: own links, other shorteners, IP hosts, phishing hostnames). - API pages: authentication with Bearer keys, the new error codes and the content or target checks, every example sends the key. - FAQ: where the key comes from, the daily limits, refusals with 409/422, a form that creates nothing without Turnstile keys. - Usage: the spam protection and the new limits. - Installation: Node.js 24, the new environment variables, managing keys with scripts/api-key.sh, a note for the update. - Privacy: Cloudflare Turnstile as the only third-party script, how the client address is taken, the language cookie is NEXT_LOCALE.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
MSK Paste and MSK Shortener store API keys as scrypt hashes now and stop an address after ten wrong keys in ten minutes (429, key-attempts).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents MSK-Scripts/msk-paste#30 and MSK-Scripts/msk-shortener#42. Merge only after both are deployed, every push to
mainhere goes live at once.What changes, English and German
mskp_…,msks_…), and without one the API answers401. The new error codes and the content or target checks are documented, and every example sends the key. The hosted instances do not hand out keys.409/422, and a form that creates nothing because the Turnstile keys are missing.CAPTCHA_*,DAILY_*,API_KEY_CREATE_PER_HOUR), managing keys withscripts/api-key.sh, and a note for the update.X-Real-IPor the lastX-Forwarded-Forentry. The language cookie isNEXT_LOCALE, which is what the code sets.Not touched, still out of date
clicks.ip_hashwas dropped with migration 004. Affected: privacy, usage, faq, installation..env.exampleof the shortener says port 3001, the docs say 3011.