Bug #6688


Special characters in a password cause problems

Added by John Dickinson over 6 years ago. Updated over 6 years ago.

Dynamic DNS
Target version:
Start date:
Due date:
% Done:


Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
Affected Architecture:


With the following config snippet (some info redacted), pfsense reports:

php-fpm[71756]: /services_dyndns_edit.php: phpDynDNS (home): (Error) Not a valid username or password!

After changing the password in OpenDNS to something that had different special characters, the issue is resolved (ie OpenDNS is updated properly).

Actions #1

Updated by Jim Pingle over 6 years ago

  • Category set to Dynamic DNS
  • Target version set to 2.4.0
  • Affected Version set to All

If that example you posted is the one that didn't work, I can see why. Looks like ">" was changed to "&gt;" twice in the same password.

The password field probably needs to be base64 encoded in config.xml so it doesn't fall into traps like that.

Actions #2

Updated by John Dickinson over 6 years ago

Although I don't really know PHP, I can dive into the code and poke around. It looks like it's pretty easy to do base64 encode/decode, and that would fix it for me. However, I'm not really sure how to tackle the migration or testing issue. I can simply decode whatever's there in the field now, because that would break existing users who have set the password, and it doesn't seem very friendly to force users to re-enter their password so it can be encoded. And for testing, I don't really know how that works for PHP.

Any guidance would be appreciated.

Actions #3

Updated by Phillip Davis over 6 years ago

Have a look at the end of
You can add a new section there that will encode existing passwords.
Increment the latest_config number in and check (the default config provided on install and reset to factory defaults)
This commit had recent code that upgraded the config, useful as an example:

Actions #4

Updated by Jim Thompson over 6 years ago

  • Assignee set to Jim Pingle

Please look at Phil'a patch

Actions #5

Updated by Jim Pingle over 6 years ago

I committed a fix to store the passwords in base64. Worked fine here but could use more testing. 2.4 only for the time being.

Actions #6

Updated by Jim Pingle over 6 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #7

Updated by Jim Pingle over 6 years ago

  • Status changed from Feedback to Resolved

Base64 encoding works fine here.


Also available in: Atom PDF