Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Digest authentication ignores changed nonce #2136

@rb07

Description

@rb07

The original application was collectd with the curl_json plugin, reported with the same title to the curl-library list.

I'm adding a self-contained test that shows the same problem. It tests against a device which I own, you'll have to find a similar device/service that keeps changing the nonce.

I did this

Ran my sample program, which retrieves some values from a device (serial number, timestamp, current power, max power of solar panels).

I expected the following

The initial output is fine, shows the readings, but any subsequent attempt (with the same curl session) fails on authentication.

The problem is that libcurl keeps reusing the original nonce, even after receiving a 401 error code, and a new nonce.

The library doesn't retry after the 401 error when it has a nonce.

curl/libcurl version

libcurl/7.56.1

operating system

Tested on Linux, and re-tested on Cygwin, both have the same curl version, both show the same failure.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions