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

Bug: in dd24 provider - update not possible - ERROR bad authentication #236

Closed
kreditor0815 opened this issue Aug 24, 2021 · 2 comments
Closed
Assignees

Comments

@kreditor0815
Copy link

kreditor0815 commented Aug 24, 2021

TLDR: The plugin for dd24 seems to be broken. No update is possible ("ERROR bad authentication"). It seems, there is a typo or copy&paste error in source @ the if/else near

if p.useProviderIP {
values.Set("hostname", "auto")
} else {
values.Set("hostname", ip.String())
}

  1. Is this urgent: Yes

  2. DNS provider(s) you use: dd24

  3. Program version:
    Running version latest built on 2021-08-16T12:40:55Z (commit 51dd14c)

  4. What are you using to run the container: docker-compose

version: "2"
services:
  ddns-updater:
    image: qmcgaw/ddns-updater
#    container_name: ddns-updater
#    network_mode: bridge
    ports:
      - 25425:8000/tcp
    volumes:
      - /app-data/ddns/data:/updater/data
    environment:
      - CONFIG=
      - PERIOD=5m
      - UPDATE_COOLDOWN_PERIOD=5m
      - PUBLICIP_FETCHERS=all
      - PUBLICIP_HTTP_PROVIDERS=all
      - PUBLICIPV4_HTTP_PROVIDERS=all
      - PUBLICIPV6_HTTP_PROVIDERS=all
      - PUBLICIP_DNS_PROVIDERS=all
      - PUBLICIP_DNS_TIMEOUT=3s
      - HTTP_TIMEOUT=10s

      # Web UI
      - LISTENING_PORT=8000
      - ROOT_URL=/

      # Backup
      - BACKUP_PERIOD=0 # 0 to disable
      - BACKUP_DIRECTORY=/updater/data

      # Other
      - LOG_LEVEL=debug
      - LOG_CALLER=hidden
      - SHOUTRRR_ADDRESSES=
    restart: unless-stopped
  1. Extra information (optional)

Logs:

2021/08/24 07:27:33 INFO Found single setting to update record
2021/08/24 07:27:33 INFO Reading history from database: domain domain.com host subdomain
2021/08/24 07:27:33 DEBUG configured to fetch IP: v4 or v6: false, v4: true, v6: false
2021/08/24 07:27:33 INFO healthcheck server: listening on 127.0.0.1:9999
2021/08/24 07:27:33 INFO backup: disabled
2021/08/24 07:27:33 INFO http server: listening on :8000
2021/08/24 07:27:34 DEBUG your public IP address are: v4 or v6: <nil>, v4: 217.84.135.123, v6: <nil>
2021/08/24 07:27:34 INFO IPv4 address of subdomain.domain.com is 217.84.151.91 and your IPv4 address is 217.84.135.123
2021/08/24 07:27:34 INFO Updating record [domain: domain.com | host: subdomain | provider: dd24 | ip: ipv4] to use 217.84.135.123
2021/08/24 07:27:34 DEBUG GET https://dynamicdns.key-systems.net/update.php?hostname=217.84.135.123&password=password | headers: User-Agent: DDNS-Updater quentin.mcgaw@gmail.com
2021/08/24 07:27:34 DEBUG 200 OK | headers: Date: Tue, 24 Aug 2021 07:27:34 GMT; Server: Apache; Strict-Transport-Security: max-age=63072000; preload; Vary: Accept-Encoding; Content-Type: text/html; charset=UTF-8 | body: [RESPONSE]code = 531description = Authorization failedruntime = 0.04queuetime = 0EOF
2021/08/24 07:27:34 ERROR bad authentication

Noticed the IP-Address in the GET Request? I think that was placed in the wrong field.

Configuration file (remove your credentials!):

{
  "settings": [
    {
      "provider": "dd24",
      "domain": "domain.com",
      "host": "subdomain",
      "password": "password",
      "ip_version": "ipv4"
    }
  ]
}

Host OS:
some kind of ubuntu

I think one possible source of this problem can be found in setting variables in this if/else:

if p.useProviderIP {
values.Set("hostname", "auto")
} else {
values.Set("hostname", ip.String())
}

But that variable already got set with the correct value @

values.Set("hostname", p.BuildDomainName())

I'm pretty confident that this should not set the value of the hostname-variable but the ip-variable (as stated in the documentation: https://www.domaindiscount24.com/faq/en/dynamic-dns).

As this lines are not avoidable and are overwriting the hostname-variable, this plugin seems completely broken to me.

@qdm12
Copy link
Owner

qdm12 commented Aug 24, 2021

You totally nailed down the issue, thanks!!

Indeed the implementation was faulty from the start, sorry I did not have feedback from the user who requested it when it got added. Let me know if it works for you, thanks!

@kreditor0815
Copy link
Author

Hi @qdm12,

I just wanted to let you know that commit c584f9b totally fixed it for me.
Thank you very much for your help :)

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

No branches or pull requests

2 participants