Commit Graph

35 Commits

Author SHA1 Message Date
jrfnl 57ef8c914f
Escape special characters the same way in all PHP versions
The `htmlspecialchars()` function is used to escape arbitrary text strings for display.

Original the default for the `$flags` parameter of that function in PHP was `ENT_COMPAT`, which translates to "convert double quotes to `"` and leave single quotes alone".

As of PHP 8.1, the default value for the `$flags` parameter has been made more robust and was changed to `ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401`, which translates to "convert both double and single quotes, replace invalid code unit sequences with a Unicode Replacement Character and treat code as HTML 4.01".

For code to provide the same/predictable output cross-version PHP, the `$flags` parameter should be explicitly set and what with the new default value being the more robust one, this commit adds that value for `$flags` in all instances of function calls to `htmlspecialchars()`.

Once the application minimum PHP version is PHP 8.1 or higher, the parameter can be removed again (as the value will then be the same as the default parameter value).

Ref: https://www.php.net/manual/en/function.htmlspecialchars.php
2025-11-24 10:50:37 +01:00
Marcus Bointon dfa731a087
Check broken links, update for HTTPS everywhere 2024-04-01 20:48:10 +02:00
Marcus Bointon 5251d33124
Escape refresh token 2024-01-31 23:05:36 +01:00
Jesper Skytte 405e5dd94a
Added Azure XOAUTH2 help and examples 2022-10-07 22:34:23 +02:00
Marcus Bointon 54afdfecb5
CS 2022-06-17 00:17:12 +02:00
Marcus Bointon ac12a9de6e
cleanup 2022-06-17 00:11:49 +02:00
rx80 eed7ef5061
Simplify use of get_oauth_token.php
Add a form the user can fill in, avoiding the need to modify clientId and clientSecret in code.
2021-07-28 12:50:34 +00:00
Steve 33fc96f877
correct invalid br (#2280) 2021-03-14 13:02:44 +01:00
Marcus Bointon 0f24617b0c
Consistent comment style 2021-02-19 13:42:01 +01:00
Juliette 3cb2162859
Improve PHPCS config (#2182)
* PHPCS: rename config file

... to `phpcs.xml.dist` to allow devs to locally overload the file by using a `.phpcs.xml` or `phpcs.xml` file, to, for instance, test out some new rules.

Includes:
* Adding the local overload files to `.gitignore`.
* Adding the standard config file to `.gitattributes`.

* PHPCS: scan missing file

The `get_oauth_token.php` file in the project root seems to have been overlooked when configuring the PHPCS ruleset.

Fixed now by adding it to the file to be scanned.

Includes minor fixes to make the file comply with the configured standard.

* CS: fix two files

Two minor CS fixes.

* PHPCS: miscellaneous changes

* Don't fix the PHPCS/external standards version restraints.
* Add the PHPCS cache file to `.gitignore`.
* Removing the no longer existent `.php_cs` file from `.gitattributes`.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
2020-10-26 17:25:46 +01:00
Marcus Bointon 13e9224c1e
Update copyright year 2020-09-02 08:41:14 +02:00
Marcus Bointon 31493b6732
Big cleanup for Symfony coding style and php-cs-fixer, see #1148 2017-09-07 18:21:09 +02:00
Marcus Bointon 0fb61f4656
is_null() -> null === 2017-09-07 10:17:38 +02:00
Marcus Bointon a8728150fd
Don't echo & concat, use `,` 2017-07-28 10:54:10 +02:00
Marcus Bointon a4fdea1590
Combine echo & exit 2017-07-28 10:48:35 +02:00
Marcus Bointon 1e53c07286 Minor fixes, code style 2016-08-31 10:26:06 +02:00
Marcus Bointon 593a0c586a Remove unneeded PHPDoc tags: @static, @access, @return void, @private
@link -> @see (PSR-5)
Always use `boolean`
2016-08-29 10:21:39 +02:00
Marcus 338f992055 Provide links for League packages 2016-04-21 12:51:31 +02:00
Marcus 26378e0eca Fix precedence 2016-04-08 01:41:46 +02:00
Marcus dca2a72e19 Add Microsoft scope options 2016-04-07 11:35:44 +02:00
Marcus 498204253c Revert to later version! 2016-04-07 11:33:03 +02:00
Marcus 33f82ab517 Merge branch 'master' into 5.4
Bump version to 5.5
Clean up code generator
# Conflicts:
#	README.md
#	examples/send_file_upload.phps
#	src/SMTP.php
#	test/phpmailerTest.php
2016-04-07 10:52:37 +02:00
Synchro bf60c58a01 Merge branch 'master' into 5.4
# Conflicts:
#	composer.lock
#	get_oauth_token.php
2016-01-07 18:39:55 +01:00
Synchro df2a2dfc79 Point at Google-specific OAuth2 lib since that's the only provider supported in 5.2.x 2016-01-07 18:35:00 +01:00
Synchro 40bdd9c488 Merge branch 'master' into 5.4
# Conflicts:
#	changelog.md
#	composer.json
#	get_oauth_token.php
2015-12-07 22:19:48 +01:00
sherryl4george 2116208ab0 Resolve Scope issues which results in auth failure 2015-12-08 02:08:46 +05:30
Synchro 14e8ef03eb Short array syntax 2015-11-10 13:45:13 +01:00
Marcus Bointon fe1e8699f0 Don't try to set accessType, at least until upstream fixes access to it 2015-10-23 21:25:23 +01:00
Marcus Bointon a4b8b91027 Partial fix for #539 2015-10-23 13:32:43 +02:00
François B b87462979b Change line endings from CRLF to LF
All files in PHPMailer have LF line endings, except those two.
Harmonize line endings to LF for consistency.
2015-10-02 18:52:29 +02:00
Synchro d6d7a8d17c Avoid IDE warnings in a mixed PHP version project 2015-09-22 08:11:09 +02:00
Synchro d24a921e52 Changed AuthType name to 'XOAUTH2'
Tested, fixed examples
Improved token script
Code cleanup
2015-05-21 03:12:17 +02:00
Synchro ed41c8310d Docs 2015-05-20 09:06:40 +02:00
Synchro e874b2a14b Code cleanups 2015-05-19 17:36:29 +02:00
sherryl4george b4cf92e843 XOAUTH Changes 2015-05-19 16:13:33 +02:00