| #
73dc0a89 |
| 06-May-2026 |
Andreas Gohr <andi@splitbrain.org> |
fix(mail): keep '&' intact in mailto links with multiple query params
Move the email-handling helpers (obfuscate, mail_isvalid, mail_quotedprintable_encode, mail_setup) out of the procedural inc/mai
fix(mail): keep '&' intact in mailto links with multiple query params
Move the email-handling helpers (obfuscate, mail_isvalid, mail_quotedprintable_encode, mail_setup) out of the procedural inc/mail.php into a namespaced dokuwiki\MailUtils class plus a new Mailer::configInit(), and add a separate MailUtils::obfuscateUrl() for the mailto-href context.
The xhtml renderer and PluginTrait now build the link label and the href separately: the address half is run through the mailguard obfuscation, the query string is preserved verbatim with only HTML escaping applied. This fixes #1690 — in 'visible' mode the previous code rawurlencoded the entire address+query, turning '?' into '%3F' and breaking multi-parameter mailto links; in all modes the query string is no longer mangled by the [at]/[dot] substitution.
Core call sites (Mailer, auth, LegacyApiCore, common, the xhtml renderer, the parser, the bundled config/styling/usermanager plugins) are migrated to MailUtils directly. The old top-level functions and PREG_PATTERN_VALID_EMAIL constant remain as deprecated shims with rector mappings.
Tests for obfuscate / mail_isvalid / mail_quotedprintable_encode are consolidated into a single _test/tests/MailUtilsTest.php and extended with regression coverage for the multi-parameter, double-escape and URL-shape cases.
Closes #1690 Replaces #1964
show more ...
|
| #
093fe67e |
| 07-Mar-2026 |
Andreas Gohr <andi@splitbrain.org> |
updated rector and applied it
|
| #
9399c87e |
| 03-Dec-2025 |
splitbrain <86426+splitbrain@users.noreply.github.com> |
Rector and PHPCS fixes
|
| #
e0c5fc94 |
| 11-Nov-2025 |
fjf2002 <franzjoseffaerber@gmail.com> |
Give explanation if no $conf could be loaded
Give explanation if no $conf could be loaded (i. e. DOKU_CONF pointing elsewhere)
|
| #
33cb4e01 |
| 03-Jun-2025 |
Andreas Gohr <gohr@cosmocode.de> |
Make is_ssl and baseurl use proper proxy checks
This should not only address #4455 but also ensures that the related headers are only used when they come from a trusted reverse proxy chain.
|
| #
6a9b3303 |
| 03-Jun-2025 |
Andreas Gohr <gohr@cosmocode.de> |
reorder the init process
This makes autoloading and $INPUT available earlier
|
| #
e086ef6c |
| 23-Nov-2024 |
lvl1ch43l <15932478+lvl1ch43l@users.noreply.github.com> |
Remove check for deprecated E_STRICT
|
| #
e860a4fb |
| 26-Jan-2024 |
Andreas Gohr <andi@splitbrain.org> |
fix is_ssl() check
There was a global statement missing? This seems to have to been broken in one of the recent merges.
Tests have been cleaned up but not changes in logic.
|
| #
4847991d |
| 26-Jan-2024 |
splitbrain <splitbrain@users.noreply.github.com> |
Rector and PHPCS fixes
|
| #
6e2ee56d |
| 26-Jan-2024 |
Andreas Gohr <andi@splitbrain.org> |
Merge pull request #4104 from m-martin-78/xfhsupport
Add support for X-Forwarded-Host proxy header
|
| #
ac56bec8 |
| 17-Jan-2024 |
Andreas Gohr <andi@splitbrain.org> |
fall back to empty (root) dir for base dir detection
When a basedir could not be detected, the default previously was '.' resulting in a valid but weird URL (http://example.com/./doku.php). We now d
fall back to empty (root) dir for base dir detection
When a basedir could not be detected, the default previously was '.' resulting in a valid but weird URL (http://example.com/./doku.php). We now default to an empty dir, resulting in a more sensible URL of http://example.com/doku.php
This should not matter in real web server setups but will be in effect while testing.
show more ...
|
| #
8033346c |
| 30-Nov-2023 |
m-martin-78 <138781920+m-martin-78@users.noreply.github.com> |
coding style
|
| #
a4dce27e |
| 13-Nov-2023 |
m-martin-78 <138781920+m-martin-78@users.noreply.github.com> |
Fixed bad copy/paste, sorry...
|
| #
2a339739 |
| 13-Nov-2023 |
m-martin-78 <138781920+m-martin-78@users.noreply.github.com> |
Check if trustedproxy is empty + changed behavior in is_ssl to match the same behavior
|
| #
6e9b1877 |
| 13-Nov-2023 |
m-martin-78 <138781920+m-martin-78@users.noreply.github.com> |
bugfix: trustedproxy is not a delimited pcre
|
| #
12a78321 |
| 13-Nov-2023 |
m-martin-78 <138781920+m-martin-78@users.noreply.github.com> |
Codestyle + check trustedproxies
Adjust code style to match dokuwiki's.
Secure the use of `X-Forwarded-Host` by checking against the https://www.dokuwiki.org/config:trustedproxy property.
|
| #
5ab8f4a0 |
| 13-Nov-2023 |
m-martin-78 <138781920+m-martin-78@users.noreply.github.com> |
Add support for X-Forwarded-Host proxy header
X-Forwarded-From and X-Forwarded-Proto are already used, so should X-Forwarded-Host.
|
| #
4602718b |
| 14-Sep-2023 |
Andreas Gohr <andi@splitbrain.org> |
Refactor autoloading, fix #4048
This refactors the auto loading stuff into an anonymous class and cleans it up a bit.
It also ensures that plugin classes are not autoloaded when the plugin is disab
Refactor autoloading, fix #4048
This refactors the auto loading stuff into an anonymous class and cleans it up a bit.
It also ensures that plugin classes are not autoloaded when the plugin is disabled. This however only works after the plugin controller has been initialized.
We currently reference some classes of the config plugin in out deprecated.php file resulting in these classes being loaded before the plugin controller. Not a big deal I guess.
show more ...
|
| #
94c7e51f |
| 14-Sep-2023 |
fiwswe <53953985+fiwswe@users.noreply.github.com> |
Remove unnecessary parentheses
|
| #
6c16a3a9 |
| 14-Sep-2023 |
fiwswe <fiwswe@fwml.de> |
Use str_starts_with/str_ends_with
|
| #
6bdc2fb9 |
| 02-Sep-2023 |
Andreas Gohr <andi@splitbrain.org> |
simplify is_ssl()
|
| #
3bfb10ae |
| 02-Sep-2023 |
Andreas Gohr <andi@splitbrain.org> |
some simplification in getBaseURL after cleanup
|
| #
d4f83172 |
| 31-Aug-2023 |
Andreas Gohr <andi@splitbrain.org> |
code style: line breaks
|
| #
90fb952c |
| 31-Aug-2023 |
Andreas Gohr <andi@splitbrain.org> |
code style: operator spacing
|
| #
4b230b99 |
| 31-Aug-2023 |
Andreas Gohr <andi@splitbrain.org> |
code style: indent fixes
|