Bookmarklet #1

Closed
opened 1 year ago by inhji · 2 comments
inhji commented 1 year ago
Owner

This needs a token on the user to prevent unauthorized use of the bookmarklet endpoint

This needs a token on the user to prevent unauthorized use of the bookmarklet endpoint
Poster
Owner
(function() {
    var t;
    try {
        t = ((window.getSelection && window.getSelection()) || (document.getSelection && document.getSelection()) || (document.selection && document.selection.createRange && document.selection.createRange().text));
    } catch (e) {
        t = "";
    };
    window.location = "https://quill.p3k.io/bookmark?url=" + encodeURIComponent(window.location.href) + "&content=" + encodeURIComponent((t == '' ? '' : '"' + t + '"')) + "&name=" + encodeURIComponent(document.title) + "&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNzEzIiwibWUiOiJodHRwczpcL1wvaW5oamkuZGVcLyIsImNyZWF0ZWRfYXQiOjE1NzQ1MDE2NTV9.7wr0LLRiDhRwMsooVdnFAT4JJNMTkFC_iUjRPNCGvcM";
})();
```js (function() { var t; try { t = ((window.getSelection && window.getSelection()) || (document.getSelection && document.getSelection()) || (document.selection && document.selection.createRange && document.selection.createRange().text)); } catch (e) { t = ""; }; window.location = "https://quill.p3k.io/bookmark?url=" + encodeURIComponent(window.location.href) + "&content=" + encodeURIComponent((t == '' ? '' : '"' + t + '"')) + "&name=" + encodeURIComponent(document.title) + "&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNzEzIiwibWUiOiJodHRwczpcL1wvaW5oamkuZGVcLyIsImNyZWF0ZWRfYXQiOjE1NzQ1MDE2NTV9.7wr0LLRiDhRwMsooVdnFAT4JJNMTkFC_iUjRPNCGvcM"; })(); ```
inhji changed title from bookmarklet to Bookmarklet 1 year ago
Poster
Owner
(function() {
    var t;
    try {
        t = ((window.getSelection && window.getSelection()) || (document.getSelection && document.getSelection()) || (document.selection && document.selection.createRange && document.selection.createRange().text));
    } catch (e) {
        t = "";
    };
    window.location = "https://localhost:4000/bookmark?url=" + encodeURIComponent(window.location.href) + "&content=" + encodeURIComponent((t == '' ? '' : '"' + t + '"')) + "&name=" + encodeURIComponent(document.title) + "&token=<TOKEN>";
})();
```js (function() { var t; try { t = ((window.getSelection && window.getSelection()) || (document.getSelection && document.getSelection()) || (document.selection && document.selection.createRange && document.selection.createRange().text)); } catch (e) { t = ""; }; window.location = "https://localhost:4000/bookmark?url=" + encodeURIComponent(window.location.href) + "&content=" + encodeURIComponent((t == '' ? '' : '"' + t + '"')) + "&name=" + encodeURIComponent(document.title) + "&token=<TOKEN>"; })(); ```
inhji closed this issue 1 year ago
inhji referenced this issue from a commit 1 year ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.