Skip to content

More protection against breaking the demo#2

Merged
Alkarex merged 1 commit intoFreshRSS:mainfrom
Inverle:protect-demo
Jul 7, 2025
Merged

More protection against breaking the demo#2
Alkarex merged 1 commit intoFreshRSS:mainfrom
Inverle:protect-demo

Conversation

@Inverle
Copy link
Member

@Inverle Inverle commented Jul 7, 2025

Disallow changing the authentication method in authController so that this doesn't happen:

image

I took the screenshot yesterday, and today it's still broken: https://demo.freshrss.org
And I also realized that the demo user can be modified by calling other actions instead, so that's now fixed in userController.

@Inverle
Copy link
Member Author

Inverle commented Jul 7, 2025

Changing UserJS or UserCSS should also be disallowed on demo user.

@Alkarex Alkarex merged commit a963a95 into FreshRSS:main Jul 7, 2025
Alkarex pushed a commit to FreshRSS/FreshRSS that referenced this pull request Jul 7, 2025
Related: FreshRSS/xExtension-Demo#2, #7559 (comment)

Mostly to make sure that no one is able to break the demo instance
But the issues below could possibly be exploited in other scenarios too:
* Setting a theme like `../../lib/core-extensions/UserJS`: this directory contains `metadata.json` like themes do, so FreshRSS treats it as a theme after setting it and doesn't load any CSS
* Setting a theme like `x dropdown-menu`: the `dropdown-menu` class was able to get injected into the `<body>` element since #7559 and turn every page blank
@Alkarex
Copy link
Member

Alkarex commented Jul 7, 2025

Ping @marienfressinaud

@Inverle
Copy link
Member Author

Inverle commented Jul 7, 2025

Changing UserJS or UserCSS should also be disallowed on demo user.

#3

@Inverle Inverle deleted the protect-demo branch July 7, 2025 22:15
@marienfressinaud
Copy link
Member

Thanks! I just fixed the demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants