Skip to content

Commit

Permalink
fix: encode RSS uris with escape sequences before fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
pinapelz committed Oct 23, 2024
1 parent 15ae160 commit 97d5ce9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
### Server
- Fix: Nested proxy requestsを検出した際にブロックするように
[ghsa-gq5q-c77c-v236](https://github.com/misskey-dev/misskey/security/advisories/ghsa-gq5q-c77c-v236)
- Fix: Encode RSS urls with escape sequences before fetching allowing query parameters to be used

## 2024.10.1

Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/ui/_common_/statusbar-rss.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/widgets/WidgetRss.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>();
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/widgets/WidgetRssTicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>();
Expand Down

0 comments on commit 97d5ce9

Please sign in to comment.