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

Failed to upload avatar on user account page because of ccm_token error #8218

Closed
jlucki opened this issue Nov 1, 2019 · 0 comments
Closed

Comments

@jlucki
Copy link
Contributor

jlucki commented Nov 1, 2019

I've seen this occur on both 8.5.2 and the develop branch. I've tried tracking down the source of the error but couldn't find where or how the errant ccm_token is being added.

To reproduce, install concrete5 (latest version or develop branch). After install, you'll be immediately logged into the CMS. navigate to /index.php/account/avatar

Try uploading an avatar. Click the little green checkmark. You'll see the endpoint response is a 404 error:

Screenshot 2019-11-01 at 08 44 08

I've tracked down why it's happening, but not the root cause. Two ccm_token values are being submitted with the request:

Screenshot 2019-11-01 at 08 49 06

When the ccm_token value for the form is validated, it fails, because the form data token is overriding the query string ccm_token, which is the one we want to validate against.

The query string ccm_token is added here: web/concrete/single_pages/account/avatar.php, but I couldn't find where the other token is coming from. The token is being validated here: web/concrete/controllers/single_page/account/avatar.php

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

No branches or pull requests

1 participant