-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
DOS CRLF line endings in wp-config.php and some other files #936
Comments
This matches the upstream line endings: https://github.com/WordPress/WordPress/blob/24fcd3467390f7a263670291d3508f1814c8130f/wp-config-sample.php $ wget -qO- 'https://github.com/WordPress/WordPress/raw/24fcd3467390f7a263670291d3508f1814c8130f/wp-config-sample.php' | file -
/dev/stdin: PHP script, ASCII text, with CRLF line terminators
$ wget -qO- 'https://github.com/WordPress/WordPress/raw/24fcd3467390f7a263670291d3508f1814c8130f/wp-config-sample.php' | hexdump -C | tail
00000c80 64 65 66 69 6e 65 28 20 27 41 42 53 50 41 54 48 |define( 'ABSPATH|
00000c90 27 2c 20 5f 5f 44 49 52 5f 5f 20 2e 20 27 2f 27 |', __DIR__ . '/'|
00000ca0 20 29 3b 0d 0a 7d 0d 0a 0d 0a 2f 2a 2a 20 53 65 | );..}..../** Se|
00000cb0 74 73 20 75 70 20 57 6f 72 64 50 72 65 73 73 20 |ts up WordPress |
00000cc0 76 61 72 73 20 61 6e 64 20 69 6e 63 6c 75 64 65 |vars and include|
00000cd0 64 20 66 69 6c 65 73 2e 20 2a 2f 0d 0a 72 65 71 |d files. */..req|
00000ce0 75 69 72 65 5f 6f 6e 63 65 20 41 42 53 50 41 54 |uire_once ABSPAT|
00000cf0 48 20 2e 20 27 77 70 2d 73 65 74 74 69 6e 67 73 |H . 'wp-settings|
00000d00 2e 70 68 70 27 3b 0d 0a |.php';..|
00000d08 |
(In other words, this is expected behavior.) |
then the question raises: why?
|
@pluraltouch this comes directly from the package that wordpress releases. It would need to be addressed there. |
It's a totally fair question -- upstream has made the intentional choice though. My guess would be because it's common for users to do a file share of their WordPress instance to another system where they edit the files, and that system is often Windows (or was, anyhow), so it's easier to use Windows line-endings which work reasonably in both systems than the opposite. Regardless of what upstream's motivation of this is, we're not going to override it -- our copy of the Additional to that, if you're using |
After a fresh install using
wordpress:6.7.1-php8.3-apache
image, andwordpress:cli
image,wp-config.php
contains DOS line endings:0d0a
after each line. Some other files could be also affected, for examplelicense.txt
.I use
wp core install
to set up the site inwordpress:cli
image.The text was updated successfully, but these errors were encountered: