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

Lookup per invalid IP address gives Internal Server Error #9

Open
btlogy opened this issue May 29, 2019 · 4 comments
Open

Lookup per invalid IP address gives Internal Server Error #9

btlogy opened this issue May 29, 2019 · 4 comments

Comments

@btlogy
Copy link

btlogy commented May 29, 2019

Likely introduced by #1, query sent with invalid or empty IP gives a 500:

$ curl -vvv 'https://bgpranking.circl.lu/ipasn' -d 'ip='
...
> POST /ipasn HTTP/1.1
> Host: bgpranking.circl.lu
> User-Agent: curl/x.x.x
> Accept: */*
> Content-Length: 3
> Content-Type: application/x-www-form-urlencoded
> 
* upload completely sent off: 3 out of 3 bytes
< HTTP/1.1 500 INTERNAL SERVER ERROR
< Date: Wed, 29 May 2019 18:30:38 GMT
< Server: gunicorn/x.x.x
< Strict-Transport-Security: max-age=15768000
< Content-Type: text/html
< Content-Length: 290
< Connection: close
< 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>
...
@btlogy
Copy link
Author

btlogy commented May 29, 2019

I guess it lacks a validation here

@Rafiot Rafiot transferred this issue from D4-project/BGP-Ranking May 29, 2019
@Rafiot
Copy link
Contributor

Rafiot commented May 29, 2019

@adulau
Copy link
Member

adulau commented May 29, 2019

Indeed, if the value is not an IP (any string), you'll get back a 500.

@Rafiot Rafiot transferred this issue from D4-project/IPASN-History May 29, 2019
@Rafiot
Copy link
Contributor

Rafiot commented May 29, 2019

(.... and moving it back to here because the webserver doesn't return anything anymore and I don't have time to fix it rn)

@Rafiot Rafiot reopened this May 29, 2019
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

3 participants