[Bugfix] Improve OPML route security (#535)

* WIP - moved plugs; set up a new token-protected route plug

* Added a route_token column to settings model

* Hooked up token_protected_route plug to database

* Hooked up new OPML route to UI; turned RSS and OPML feed buttons into links

* Docs, tests

* Added a note about the phoenix bug
This commit is contained in:
Kieran
2024-12-30 17:40:23 -08:00
committed by GitHub
parent 246ca3b299
commit f51b219860
12 changed files with 295 additions and 158 deletions
@@ -1,18 +1,16 @@
<.button_dropdown text="Actions" class="justify-center w-full sm:w-50">
<:option>
<span
x-data="{ copied: false }"
x-on:click={"
copyWithCallbacks(
'#{rss_feed_url(@conn, @source)}',
() => copied = true,
() => copied = false
)
"}
>
<.link href={rss_feed_url(@conn, @source)} x-data="{ copied: false }" x-on:click={~s"
$event.preventDefault();
copyWithCallbacks(
'#{rss_feed_url(@conn, @source)}',
() => copied = true,
() => copied = false
)
"}>
Copy RSS Feed
<span x-show="copied" x-transition.duration.150ms><.icon name="hero-check" class="ml-2 h-4 w-4" /></span>
</span>
</.link>
</:option>
<:option>
<span x-data="{ copied: false }" x-on:click={~s"