Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing Documentation on K_ALLOWED_TCPDF_TAGS #716

Open
THenkeDE opened this issue Apr 25, 2024 · 2 comments
Open

missing Documentation on K_ALLOWED_TCPDF_TAGS #716

THenkeDE opened this issue Apr 25, 2024 · 2 comments

Comments

@THenkeDE
Copy link

THenkeDE commented Apr 25, 2024

With the breaking change of 6.7.4 (2024-03-24) the K_ALLOWED_TCPDF_TAGS definition has beein added, too and changelog is saying:

New K_ALLOWED_TCPDF_TAGS configuration constant to set the allowed methods for the tcdpf HTML tag.

Well, even the example_049.php beeing referenced in the changelog is not making use of this and the Tag is not working in any way because the default does not allow any method:

if (!defined('K_ALLOWED_TCPDF_TAGS')) {
	define('K_ALLOWED_TCPDF_TAGS', '');
}

Maybe it is just me but have you checked the example prior publishing? This hard to find "bug" gave me headaches ...

@d-javu
Copy link

d-javu commented Apr 25, 2024

The alternative configuration file offer this:

/**
* List of TCPDF methods that are allowed to be called using HTML syntax.
* Note: each method name must end with surrounded with | (pipe) character.
* The constant K_TCPDF_CALLS_IN_HTML must be set to true.
* IMPORTANT: For security reason, disable this feature if you are allowing user HTML content.
*/
define('K_ALLOWED_TCPDF_TAGS', '|AddPage|Rect|SetDrawColor|write1DBarcode|');

@THenkeDE
Copy link
Author

well yes, i should have mentioned that i looked it up, too.

But i still think that an example that shows how a "BREAKING CHANGE" should be used should not rely on a slightly "hidden" configuration override.

A note inside the example with a reference to the tcpdf_config_alt.php configline would've done the job.

Configurations of such a major change should not be hidden under the radar like this.

Anyhow, thanks for reply and reminding myself of beeing a little more into detail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants