Almost browsers prevent to XSS that is using javascript: protocol.
<a href=javascript:alert(location.origin) traget=_blank>XSS</a>Demo: https://nuvjcp.csb.app/
Almost browsers prevent to XSS that is using javascript: protocol.
<a href=javascript:alert(location.origin) traget=_blank>XSS</a>Demo: https://nuvjcp.csb.app/
How do I implement "Allow users to request from all origins"?
Major frameworks's implementation is following.
*
*
*Pre-hijacking Attacksについてのメモ書きです。 元の論文と記事は次のページを読んでください。
Pre-hijacking Attacks はメールアドレスの確認をしないでアカウントを作れるサービスという前提があります。
アカウント作成からそのまま機能を利用できるようにすることで、利用体験をよくするための施策として、メールアドレスの確認のステップを後回し またはしないサービスがあります。
| // ==UserScript== | |
| // @name pinia: clean document | |
| // @namespace https://pinia.vuejs.org/ | |
| // @match https://pinia.vuejs.org/* | |
| // @grant none | |
| // @version 1.0 | |
| // @author - | |
| // @description Remove unreadable web fonts style | |
| // @run-at document-end | |
| // ==/UserScript== |
hoge.example.com でユーザが作成したサイトをホスティングして、任意のJavaScriptを実行できる状態にしたいケース。
サブドメインを分けることで、Fetch APIなどはSame Origin Policyを基本にするため、別のサブドメインや example.com に対するリクエストなどはできなくなる。
一方で、CookieはSame Origin Policyではない。
デフォルトでは、hoge.example.com から example.com に対するCookieが設定できる。
これを利用したDoS(Cookie Bomb)やこの挙動を組み合わせた別の脆弱性に利用できる場合がある。
0209d85 Normative: add RegExp match indices, including RegExp d flag (#1713)ca53334 Normative: Fix out-of-range NaNs in date set methods (#2136)c37ac03 Normative: List new Unicode v14 Script/Script_Extensions values (#2515)7c847e8 Normative: Arbitrary module namespace identifier names (#2154)02bf300 Normative: add error cause (#2356)01a6d27 Normative: require Number::exponentiate to return a Number value ([#2523](https://github.com/tc39/ecma262/issues/| /* Ultra lightweight Github REST Client */ | |
| // original inspiration via https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
| const token = 'github-token-here' | |
| const githubClient = generateAPI('https://api.github.com', { | |
| headers: { | |
| 'User-Agent': 'xyz', | |
| 'Authorization': `bearer ${token}` | |
| } | |
| }) |
| // ==UserScript== | |
| // @name irodr: komesan | |
| // @namespace github.com/azu | |
| // @match https://irodr.netlify.app/ | |
| // @grant none | |
| // @version 1.0 | |
| // @author azu | |
| // @description irodr integrate | |
| // @run-at document-end | |
| // ==/UserScript== |
| "use strict"; | |
| var __webpack_require__ = { | |
| d: (_, e) => { | |
| for (var r in e) __webpack_require__.o(e, r) && !__webpack_require__.o(_, r) && Object.defineProperty(_, r, { | |
| enumerable: !0, | |
| get: e[r] | |
| }) | |
| }, o: (_, e) => Object.prototype.hasOwnProperty.call(_, e), r: _ => { | |
| "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(_, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(_, "__esModule", { value: !0 }) | |
| } |