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

not enough error checking when curl returns not authorized #6

Open
LincolnBryant opened this issue Jan 29, 2020 · 0 comments
Open

not enough error checking when curl returns not authorized #6

LincolnBryant opened this issue Jan 29, 2020 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers provisioner Issues with the client tooling that provisions users

Comments

@LincolnBryant
Copy link
Contributor

we have a curl command to fetch raw user data, around line 228 in the current revision

        if [ "$?" -ne 0 ]; then
                echo "Error: Failed to download data from ${API_ENDPOINT}/v1alpha1/multiplex" 1>&2
                rmdir "$LOCK_DIR"
                exit 1
        fi

we check that curl has exited with some status code other than 0,but we don't check the HTTP status codes for the curl output.

in this particular case we were getting an error 403 because of some other issue with our token:

{"/v1alpha1/users/cnweaver?token=BLAHBLAHBLAH":{"status":403,"body":"{\"kind\":\"Error\",\"message\":\"Not authorized\"}"},"/v1alpha1/users/lincolnb?token=rGozleeI8z0UBLw2NUEPGY":{"status":403,"body":"{\"kind\":\"Error\",\"message\":\"Not authorized\"}"}}
@LincolnBryant LincolnBryant added bug Something isn't working good first issue Good for newcomers provisioner Issues with the client tooling that provisions users labels Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers provisioner Issues with the client tooling that provisions users
Projects
None yet
Development

No branches or pull requests

1 participant