Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Potential CSRF attack" when trying to manage users #491

Closed
N4444VX opened this issue Mar 19, 2022 · 1 comment
Closed

"Potential CSRF attack" when trying to manage users #491

N4444VX opened this issue Mar 19, 2022 · 1 comment
Labels

Comments

@N4444VX
Copy link

N4444VX commented Mar 19, 2022

System Information
Podcast Generator Version: 3.2.0-beta
Webserver: docker - mitlabs/apache-php7.3
PHP Version: docker - mitlabs/apache-php7.3

Expected behavior
Expected a page to manage users

Actual behavior
Returns blank webpage with only the following: Potential CSRF attack on both Brave and Firefox browsers.

Docker logs

172.18.0.2 - - [19/Mar/2022:01:47:35 +0000] "GET /admin/pg_users.php?username=user HTTP/1.1" 200 279 "https://podcast.domain.tld/admin/pg_users.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36"

How to reproduce
Try to click a user link ( https://podcast.domain.tld/admin/pg_users.php?username=user ) on page https://podcast.domain.tld/admin/pg_users.php

Question
Is this a PodcastGenerator problem or an Apache/PHP config problem??

@N4444VX N4444VX added the Bug label Mar 19, 2022
@coldacid
Copy link
Member

Fix is in v3.2.0 beta 2

GaneshKandu added a commit to GaneshKandu/PodcastGenerator that referenced this issue Apr 21, 2022
Hi,

I am getting similar error mentioned here PodcastGenerator#491 

unsername is in post request but its checking it in get request, i think we should check usercreate in get

its working for me

https://github.com/PodcastGenerator/PodcastGenerator/blob/4b590615a1a51654a6c90137f03470c405534ed1/PodcastGenerator/admin/pg_users.php#L14-L16
coldacid pushed a commit that referenced this issue Apr 22, 2022
For each operation case (change password, delete, create), call
`checkToken()` individually rather than having the one call at the top.
This avoids the issue where we have different GET params that may or may
not need to be protected against CSRF attacks.

Credit to @GaneshKandu for discovering my original fix in 44379be didn't
fully fix the problem in #491.

Refs #491, supersedes #588
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants