Project

General

Profile

Actions

Regression #12021

open

NoIP.com incorrectly encodes Dynamic DNS update credentials

Added by Viktor Gurov 5 months ago. Updated 1 day ago.

Status:
Feedback
Priority:
Normal
Assignee:
Category:
Dynamic DNS
Target version:
Start date:
06/10/2021
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
22.01
Release Notes:
Default
Affected Version:
2.5.2
Affected Architecture:

Description

There is no need to `urlencode` user credentials (CURLOPT_USERPWD already encode them):

curl_setopt($ch, CURLOPT_USERPWD, urlencode($this->_dnsUser) . ':' . $this->_dnsPass);

- with `urlencode` it always returns "badauth":
/services_dyndns_edit.php: Dynamic DNS noip-free (XXXXX.ddns.net): _update() starting.
/services_dyndns_edit.php: Response Header: HTTP/2 401
/services_dyndns_edit.php: Response Header: server: nginx
/services_dyndns_edit.php: Response Header: content-type: text/plain; charset=UTF-8
/services_dyndns_edit.php: Response Header: cache-control: no-cache
/services_dyndns_edit.php: Response Header: www-authenticate: Basic realm="No-IP DNS Update API" 
/services_dyndns_edit.php: Response Header: date: Thu, 10 Jun 2021 09:49:39 GMT
/services_dyndns_edit.php: Response Header: content-length: 9
/services_dyndns_edit.php: Response Header: 
/services_dyndns_edit.php: Response Header: 
/services_dyndns_edit.php: Response Data: badauth\x0d

OK, without `urlencode`:

/services_dyndns_edit.php: Response Header: HTTP/2 200
/services_dyndns_edit.php: Response Header: server: nginx
/services_dyndns_edit.php: Response Header: content-type: text/plain; charset=UTF-8
/services_dyndns_edit.php: Response Header: cache-control: no-cache
/services_dyndns_edit.php: Response Header: date: Thu, 10 Jun 2021 09:45:06 GMT
/services_dyndns_edit.php: Response Header: content-length: 18
/services_dyndns_edit.php: Response Header: 
/services_dyndns_edit.php: Response Header: 
/services_dyndns_edit.php: Response Data: good X.X.X.X\x0d

Regression of #11815 (pfSense Plus 21.05)

https://forum.netgate.com/topic/164263/any-known-issues-since-update-dyn-dns

Actions #2

Updated by Jim Pingle 5 months ago

  • Subject changed from NoIP.com invalid credentials encoding to NoIP.com incorrectly encodes Dynamic DNS update credentials
  • Status changed from New to Pull Request Review
  • Target version set to 2.6.0
  • Plus Target Version set to 21.09
Actions #3

Updated by Renato Botelho 5 months ago

  • Status changed from Pull Request Review to Feedback
  • Assignee set to Viktor Gurov

PR has been merged. Thanks!

Actions #4

Updated by Viktor Gurov 5 months ago

  • % Done changed from 0 to 100
Actions #5

Updated by Marcos Mendoza 5 months ago

Maybe the username:password syntax can be avoided altogether and instead the Authorization header can be used as specified here: https://www.noip.com/integrate/request

Actions #6

Updated by Viktor Gurov 5 months ago

Marcos Mendoza wrote:

Maybe the username:password syntax can be avoided altogether and instead the Authorization header can be used as specified here: https://www.noip.com/integrate/request

this is the same as using the CURL_USERPWD option, see https://en.wikipedia.org/wiki/Basic_access_authentication

Actions #7

Updated by Jim Pingle 4 months ago

  • Affected Version changed from 2.6.0 to 2.5.2
Actions #8

Updated by Bug Reporter 3 months ago

Works with simple passwords, still does not work with complex ones.

Getting "Response Data: badauth\x0d ".

Actions #9

Updated by Greg B 3 months ago

Manually made the change detailed in 4aab19d4ade5d164c22bd63b2833d54bab740d59 and it's working for me now.

Actions #10

Updated by Kris Phillips 2 months ago

This seems to cause 504 Gateway Timeouts in the webConfigurator, but still works on 21.05.1.

Actions #11

Updated by Jim Pingle 1 day ago

  • Plus Target Version changed from 21.09 to 22.01
Actions

Also available in: Atom PDF