Head code: let the operator paste what ad networks need
Ad networks require script tags in the head. Restricting what can go there makes the product unusable, so restrict who can set it instead — and keep popunder loaders off public pages.
13 entries
Ad networks require script tags in the head. Restricting what can go there makes the product unusable, so restrict who can set it instead — and keep popunder loaders off public pages.
The request URL contains your key. Flash it in an error and anyone who can make the provider fail can read it.
v2 keys carry scopes. A faucet needs send and read; anything with admin scope on a web server is a wallet waiting to be emptied.
Their postbacks come from one address. Enforcing it is free — unless you are behind Cloudflare, where REMOTE_ADDR is Cloudflare and the check rejects everything.
A sample committed, the real one ignored, the release built by exclusion, and a web server rule that refuses to serve either.
Set the cheap headers everywhere. Framing is the one to decide deliberately: a site that refuses to be embedded cannot be shown in a rotator or an exchange.
Every admin action and every login, with who, what, from where. Append-only, and never editable from the panel that writes it.
A status column, one check in the session guard, and a shadow-banned tier that keeps working while earning nothing.
One attacker with many addresses and many attackers on one address are different attacks. A single counter catches only one of them.
TOTP is HMAC-SHA1 over a time counter, truncated to six digits. About forty lines, and it works with every authenticator app.
One token per session, compared in constant time, checked on every state-changing POST. Twenty lines and no dependency.
Five flags and one call to regenerate. Defaults leave the session cookie readable by scripts and sendable over plain HTTP.
Postback URLs, webhook targets and site verification all mean fetching an address someone else chose. This is the guarded version.