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

Modern Theme - CSRF in search URLs #8

Open
conejoninja opened this issue Jun 5, 2014 · 1 comment
Open

Modern Theme - CSRF in search URLs #8

conejoninja opened this issue Jun 5, 2014 · 1 comment

Comments

@conejoninja
Copy link
Member

I know that Modern theme is not officialy supported, and several fixes I've posted last year were not accepted (Garcia told me he does not generally accept pull requests), so I think there is no point in posting another one, but I just wish to clarify this.

All modern-theme based themes I've tested (for example, Twitter theme from official Osclass site and many other user-spawned ones) insert CSRF tokens into search from the main page, for e.g.:

Modern Theme search url from main page:

/index.php?CSRFName=CSRF837685821_1893338073&CSRFToken=a83b40c5aacc60a1d0ceda9fb40ed75d7e66edcf351be8abe0fc6f8d9baf49e8abe2b76d09bfeda837b675a0c8d49c8926ce18258b137af36e9ed3164f702ab3&page=search&sPattern=test&sCategory=

But, in Bender theme the same URL looks like this:

/index.php?page=search&sPattern=test&sCategory=

My quick investigation of CSRF reveiled that they should not be present in get method (which is used for search), so this has to be a theme-related issue.

To solve this, just put into the search form another class:
class="nocsrf"

and now the search URL will look exactly as in Bender theme (and more meaningfull and user-friendly, btw).

I just need a confirmation from the devs that this is the right way.
Thanks

Original issue here : osclass/Osclass#1481

@dev-101
Copy link

dev-101 commented Jun 11, 2014

Pull request for Modern Theme here:
#9

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

2 participants