fix: encode RSS uris with escape sequences before fetching (#14826)

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
Pinapelz 2024-10-28 05:04:46 -07:00 committed by GitHub
parent eb701f2ff4
commit 0472d43ee9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 3 deletions

View File

@ -20,6 +20,7 @@
- Fix: Turnstileが失敗・期限切れした際にも成功扱いとなってしまう問題を修正
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/768)
- Fix: デッキのタイムラインカラムで「センシティブなファイルを含むノートを表示」設定が使用できなかった問題を修正
- Fix: Encode RSS urls with escape sequences before fetching allowing query parameters to be used
- Fix: リンク切れを修正
### Server

View File

@ -48,7 +48,7 @@ const fetching = ref(true);
const key = ref(0);
const tick = () => {
window.fetch(`/api/fetch-rss?url=${props.url}`, {}).then(res => {
window.fetch(`/api/fetch-rss?url=${encodeURIComponent(props.url)}`, {}).then(res => {
res.json().then((feed: Misskey.entities.FetchRssResponse) => {
if (props.shuffle) {
shuffle(feed.items);

View File

@ -70,7 +70,7 @@ const items = computed(() => rawItems.value.slice(0, widgetProps.maxEntries));
const fetching = ref(true);
const fetchEndpoint = computed(() => {
const url = new URL('/api/fetch-rss', base);
url.searchParams.set('url', widgetProps.url);
url.searchParams.set('url', encodeURIComponent(widgetProps.url));
return url;
});
const intervalClear = ref<(() => void) | undefined>();

View File

@ -99,7 +99,7 @@ const items = computed(() => {
const fetching = ref(true);
const fetchEndpoint = computed(() => {
const url = new URL('/api/fetch-rss', base);
url.searchParams.set('url', widgetProps.url);
url.searchParams.set('url', encodeURIComponent(widgetProps.url));
return url;
});
const intervalClear = ref<(() => void) | undefined>();