nixpkgs/nixos/modules
Martin Weinelt f4d6d51a09 nixos/wordpress: regenerate secret keys if misspelled key name is found
A secret key generated by the nixos module was misspelled, which could
possibly impact the security of session cookies.

To recover from this situation we will wipe all security keys that were
previously generated by the NixOS module, when the misspelled one is
found. This will result in all session cookies being invalidated. This
is confirmed by the wordpress documentation:

> You can change these at any point in time to invalidate all existing
> cookies. This does mean that all users will have to login again.

https://wordpress.org/support/article/editing-wp-config-php/#security-keys

Meanwhile this issue shouldn't be too grave, since the salting function
of wordpress will rely on the concatenation of both the user-provided
and automatically generated values, that are stored in the database.

> Secret keys are located in two places: in the database and in the
> wp-config.php file. The secret key in the database is randomly
> generated and will be appended to the secret keys in wp-config.php.

https://developer.wordpress.org/reference/functions/wp_salt/

Fixes: 2adb03fdae ("nixos/wordpress:
generate secrets locally")

Reported-by: Moritz Hedtke <Moritz.Hedtke@t-online.de>
(cherry picked from commit 724ed08df02546fea2ab38613d615dd47461528c)
2021-05-29 20:16:47 +00:00
..
config Merge pull request #101071 from ju1m/apparmor 2021-04-24 11:24:26 +00:00
hardware maintainers: rename metadark -> kira-bruneau (#124035) 2021-05-22 16:47:40 +02:00
i18n/input-method input methods: add kime 2021-04-19 03:05:07 +09:00
installer nix: 2.3.10 -> 2.3.11 2021-05-14 12:24:54 +00:00
misc 21.05 beta release 2021-05-22 17:56:13 -07:00
profiles Merge pull request #85073 from hyperfekt/systemd-pstore 2021-05-17 00:00:52 +02:00
programs maintainers: rename metadark -> kira-bruneau (#124035) 2021-05-22 16:47:40 +02:00
security nixos/security/apparmor: utillinux -> util-linux 2021-05-17 17:14:08 +02:00
services nixos/wordpress: regenerate secret keys if misspelled key name is found 2021-05-29 20:16:47 +00:00
system nixos/networkd: add missing [DHCPServer] options 2021-05-17 18:30:37 +02:00
tasks Merge pull request #123902 from hyperfekt/mount-pstore-quiet 2021-05-23 15:04:41 +02:00
testing treewide: use perl.withPackages when possible 2021-03-31 21:35:37 +02:00
virtualisation Merge pull request #122203 from mohe2015/imperative-nixos-container-timeout 2021-05-22 23:04:12 +02:00
module-list.nix nixos/dendrite: remove (#124524) 2021-05-27 10:41:05 +02:00
rename.nix quagga: remove 2021-04-22 12:48:48 +02:00