Internal server error

Solved!
Posted in General by Ferdinand Hagethorn Wed Jun 24 2015 21:08:41 GMT+0000 (UTC)·2·Viewed 426 times

After following the installation guide, and figuring out I need to pull the owasp-skf tarball from somewhere and untar it in /opt I run unto the following problem: Internal Server Error when trying to login using Chrome (mandated, no other browser is available) Logfile shows this error: 2015-06-25 08:55 User supplied not valid CSRF token FAIL HIGH 127.0.0.1 Here are the commands I used on a base Debian 8.x x64 installation: # cd /opt # wget -O owasp-skf-1.3.12.tar.gz "https://pypi.python.org/packages/source/o/owasp-skf/owasp-skf-1.3.12.tar.gz#md5=abbb1421bf2f5442693a72f9c7acea2a" # apt-get install python-pip sqlite3 lib32z1-dev python-dev libxml2-dev libxslt-dev libffi-dev libssl-dev # pip install https://github.com/mitsuhiko/flask/tarball/master # pip install owasp-skf # tar -zxvf owasp-skf-1.3.12.tar.gz # cd owasp-skf-1.3.12/skf # python skf.py All as root I've tried many sources, including a # git clone https://github.com/blabla1337/skf-flask When I set the password to 12345, and try again I get an error 500 when I hit enter instead after entering 12345 as a password. When I click Login I get a 200 but the login screen still shows.
Ferdinand Hagethorn
June 24, 2015

Forgot the ' around 12345, now I'm in.

But the dreaded 500 internal server error pops up again after doing this:

  • Add project
  • Add Processing functions (added 4 in one go)
  • Clicked on run checklist
    500 Internal Server Error

This is what shows up in the logs:
[2015-06-25 09:15:41,418] ERROR in app: Exception on /project-checklists/2 [GET]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1956, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1610, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1513, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1608, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1594, in dispatch_request
return self.view_functionsrule.endpoint
File "skf.py", line 41, in decorated_function
resp = make_response(f(args, *kwargs))
File "skf.py", line 676, in project_checklists
owasp_id = get_num(owasp_path[1])
File "skf.py", line 202, in get_num
return int(''.join(ele for ele in x if ele.isdigit()))
ValueError: invalid literal for int() with base 10: ''
127.0.0.1 - - [25/Jun/2015 09:15:41] "GET /project-checklists/2 HTTP/1.1" 500 -

Foobar
June 25, 2015

Hi Ferdinand,

Yeah ofc, i have seen this before, it will happen when the folder structure is not correct.
You did successfully installed the pip owasp-skf?

If so can you then try this:
go to your home dir en type

git clone https://github.com/blabla1337/skf-flask.git

then

cd skf-flask/skf
python skf.py

For the Mac OSX issue (error installing lxml) can you try this to resolve the installation issue:
STATIC_DEPS=true pip install lxml

Greetz,
Glenn


Foobar marked this as solved
Markdown is allowed