dnsimple adapter produces invalid URL in create_record
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lexicon (Debian) |
Fix Released
|
Unknown
|
|||
lexicon (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
[racb: see comment 1 for SRU information; regression potential: likely to be in the DNSimpple.com API for DNS record creation; however there is good existing test coverage, including for this bug being added, which I think is sufficient for regression testing during SRU verification]
The bug fixed by the following pull request is also present in lexicon v2.2.1-2, and the fix should be backported.
https:/
This causes requests to the DNSimple.com API for DNS record creation to fail because the generated URL is ill-formed.
Line 64 of is
payload = self._post(
but should be
payload = self._post(
$ lsb_release -rd
Description: Ubuntu 18.04.2 LTS
Release: 18.04
$ apt-cache policy lexicon
lexicon:
Installed: (none)
Candidate: 2.2.1-2
Version table:
2.2.1-2 500
500 http://
500 http://
500 http://
500 http://
Changed in lexicon (Debian): | |
status: | Unknown → Fix Released |
description: | updated |
description: | updated |
description: | updated |
tags: |
added: verification-done-bionic removed: verification-needed-bionic |
I am a maintainer of the Lexicon project, and want to propose a SRU for Lexicon 2.2.1 on Bionic and Lexicon 2.7.0 on Cosmic to fix that issue.
[Impact]
* Due to an undisclosed bug in Lexicon on the DNSimple provider, the creation of new DNS records
on DNSimple is not possible anymore since one month.
* This bug was present in Lexicon since 2.2.0, so it impacts Bionic and Cosmic.
* Its effect is to generate an invalid URL for DNSimple API when trying to create a new DNS record.
* For unkown reasons, the invalid URL was still accepted by DNSimple API, until something change
one month ago, and these URLs started to be rejected.
[Test Case]
* To reproduce the bug one needs a valid DNSimple account, generates an authentication token, cassettes/ dnsimple/ IntegrationTest s: typical malformed requests /api.sandbox. dnsimple. com/v2762/` instead of /api.sandbox. dnsimple. com/v2/ 762/` can be seen.
and calls this typical DNS record creation command:
`lexicon dnsimple create example.com TXT --name test --value content --auth-token [TOKEN]` to
see Lexicon raising an exception about a malformed request.
* Without a valid DNSimple account, one can still see the wrong behavior by checking the VCRpy
cassettes at tests/fixtures/
like `https:/
`https:/
* Fix proposed here both makes the live execution of Lexicon be successful, and make VCRpy have
only valid URLs referenced.
[Regression Potential]
* Besides the modifications done on the VCRpy cassettes, that are for test purposes, the fix /github. com/AnalogJ/ lexicon/ issues/ 387.
modifies only one line in Lexicon code, to fix the URL in case of record creation. Upstream
is already fixed, and correct behavior after it is confirmed at
https:/
* Fix is already applied to Disco.
* So I have no possible regression in mind.
[Other Info]
* Two separate debdiff are provided: one for Bionic, one for Cosmic. They have been generated from
the latest respective docker OS versions.