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

ZAP scanner: Cut the URL elements to the maximum size they can actually have #1804

Merged

Conversation

ptrovatelli
Copy link
Contributor

When the endpoint URL is very big, the parser fails with:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/usr/local/lib/python3.5/site-packages/django/db/backends/mysql/base.py", line 71, in execute
    return self.cursor.execute(query, args)
  File "/usr/local/lib/python3.5/site-packages/MySQLdb/cursors.py", line 206, in execute
    res = self._query(query)
  File "/usr/local/lib/python3.5/site-packages/MySQLdb/cursors.py", line 312, in _query
    db.query(q)
  File "/usr/local/lib/python3.5/site-packages/MySQLdb/connections.py", line 224, in query
    _mysql.connection.query(self, query)
MySQLdb._exceptions.DataError: (1406, "Data too long for column 'query' at row 1")

this cuts the size of the field to the actual field length in the DB

…ding to models.py (fix Data too long for column 'query')
@valentijnscholten valentijnscholten merged commit 00b7555 into DefectDojo:dev Jan 25, 2020
@ptrovatelli ptrovatelli changed the title Cut the URL elements to the maximum size they can actually have accor… ZAP scanner: Cut the URL elements to the maximum size they can actually have Jan 25, 2020
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

Successfully merging this pull request may close these issues.

3 participants