nixpkgs/nixos
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
..
doc rl-2105: mention linux_latest and potential zfs issues 2021-05-28 18:32:16 -07:00
lib Merge pull request #123823 from misuzu/test-driver-usb-boot-speedup 2021-05-21 20:47:47 +02:00
maintainers amazonImage: make statically sized again 2021-05-01 02:19:42 +00:00
modules nixos/wordpress: regenerate secret keys if misspelled key name is found 2021-05-29 20:16:47 +00:00
tests nixos/discourse: Assert deployed PostgreSQL version 2021-05-28 22:16:10 -07:00
COPYING
README
default.nix nixos: fix "nixos-rebuild build-vm-with-bootloader" for EFI systems 2021-01-08 19:36:10 +01:00
release-combined.nix nixos/release-combined: fix a test name 2021-05-17 22:52:28 +02:00
release-small.nix Merge pull request #104322 from grahamc/amazon-image 2020-11-19 18:45:07 -05:00
release.nix 21.05 beta release 2021-05-22 17:56:13 -07:00

README

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
https://nixos.org/nixos and in the manual in doc/manual.