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

XSS on admin login page #639

Closed
eikes opened this Issue Aug 22, 2011 · 1 comment

Comments

Projects
None yet
2 participants
@eikes

eikes commented Aug 22, 2011

The :email and :password variables are not escaped in the Admin controller. Also GET vars can be used where only POST should be used.

possibly adding

  params[:email] = escape_html(params[:email])
  params[:password] = escape_html(params[:password])

before

  flash[:warning] = "Login or password wrong."

might help, but I haven't tried it.

Example for this XSS (view in Firefox or Opera or IE, Webkit filters this kind of XSS):

http://www.padrinorb.com/admin/sessions/new?email=%22%3E%3Cscript%3Ealert%28%22XSS%22%29%3C/script%3E%3Cinput

@DAddYE

This comment has been minimized.

Show comment
Hide comment
@DAddYE

DAddYE Aug 23, 2011

Member

Thanks man, will be applied soon!

Member

DAddYE commented Aug 23, 2011

Thanks man, will be applied soon!

@DAddYE DAddYE closed this in 9f4c315 Aug 30, 2011

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