So I have just seen a backup fail because of escaped characters in the db_url:

Generating mysql dump for default. [0.063 sec]                          [backup]
mysqldump -hexample.koumbit.net -uaegir                                   [notice]
-p%40...  -rsites/default/database.sql aegir
[0.063 sec]
Executing: mysqldump -hmysql.koumbit.net -uaegir -p%40... -rsites/default/database.sql aegir
  mysqldump: Got error: 1045: Access denied for user 'aegir'@'example.koumbit.net' (using password: YES) when trying to connect
Adding sites directory to /var/aegir/backups/default-2009-06-17_3.tar   [backup]
[0.074 sec]

(Some parameters were changed to protect our security.)

I'll try to track this down, but it's rather annoying since it's in 0.2 and we'll need to hotfix...

Comments

anarcat’s picture

Assigned: Unassigned » anarcat
Status: Active » Needs work

Okay, so the problem seems to be related with the import mechanism, because the install functions have the urldecode() calls hooked in properly and they are nowhere to be found in import.

anarcat’s picture

Status: Needs work » Needs review
StatusFileSize
new3.61 KB

Here's a patch I'm going to test in prod. It fixes the dburl parts on import.

anarcat’s picture

Status: Needs review » Fixed

The patch works and I can now backup the site after importing again. I committed the patch as is. However, I'm worried that the backup said it succeeded when it wasn't actually able to connect to the database backend, is that a feature we want?! I have opened #494376: backup succeeds even if database connexion fails to make sure I look into this.

anarcat’s picture

Title: backup doesn't interpret properly escape characters in db_url » import doesn't escape characters in db_url
Status: Fixed » Needs work

So the committed fix works great, except verify writes back the db_url without urlencoding it (ugh!). So this breaks the site altogether.

anarcat’s picture

Status: Needs work » Needs review
StatusFileSize
new4.55 KB

So this patch works better: I urlencode the various parts before injecting them back, directly in the template.

anarcat’s picture

Status: Needs review » Fixed

I committed the fix already.

Status: Fixed » Closed (fixed)
Issue tags: -aegir-0.2-hotfix

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 6529e19 on debian, dev-dns, dev-envobject, dev-koumbit, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newhooks, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-restore, dev-services, dev-simplerinstaller, dev-site_rename, dev-ssl, dev_716166_apache_conf, dev_dns, dev_server_verify, prod-koumbit, ssl, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x authored by anarcat:
    #494358 - fix site import for sites with funky characters in passwords