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

Registration: wrong URL not detected #8

Closed
nemesifier opened this issue Jan 13, 2016 · 1 comment
Closed

Registration: wrong URL not detected #8

nemesifier opened this issue Jan 13, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@nemesifier
Copy link
Member

If a wrong URL is set in /etc/config/openwisp, the register() function does not abort and keeps going ahead.

It should instead abort and report the issue.

@nemesifier nemesifier added the bug label Jan 13, 2016
@nemesifier nemesifier self-assigned this Jan 13, 2016
@nemesifier nemesifier added this to the 0.1 milestone Jan 13, 2016
@nemesifier
Copy link
Member Author

A possible solution is to use -i option in curl and ensure the HTTP status is 201 before proceeding.

Some changes to the controller are needed anyway.

A possible desired response would be:

HTTP/1.0 201 Created
X-Frame-Options: SAMEORIGIN
Content-Type: text/plain
Connection: close
Server: Werkzeug/0.11.2 Python/3.4.3
Date: Wed, 13 Jan 2016 17:21:40 GMT

registration-result:success
uuid:07ba930c-c7e2-4039-a07b-17ddc4dae317
key:c99rvLRGL3EPzVT4CDo3mT4xAApJu18v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant