gizmore / phpgdo

Reference GDOv7 core implementation in PHP.
Other
2 stars 1 forks source link

[verbosity] [security] Escape or strip terminal/control codes when printing to a terminal with variables #4

Open chl0e3e opened 2 years ago

chl0e3e commented 2 years ago

Code Code Code Code Code Code Code Code Code Code Code

gizmore commented 2 years ago

Another take to utilize github.com issues 👍

It is unclear to me what you mean!

BUT It is important to have none, or as few as possible, filters and mutating transformers.

If there are two spaces, - i want those two spaces!

Example:

bash $ gdo mail.send chl0,Hi      theeeeeeere,I wonder which mail clients keep these spaces.

This command actually should send a mail to you, or crashes.

I am working on the renderings, maybe this issue got fixed in a coding spree?

Thanks again for taking your time!

gizmore commented 1 year ago

Sadly all the Line numbers are off now, but i assume you mean an impl for the html() function (which is kinda htmlspecialchars in www rendering mode, and current NOOP in CLI) A solution would be to implement a CLI behaviour in said function. @TODO: maybe make the html() function a callback to remove one or two IF's