Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2019-08-14 14:07:30

etc
Developer
Registered: 2010-11-11
Posts: 3,198
Website

Re: txp PHP does not output

For the record, <txp:php /> has been disabled on the second pass because is_article_body context is not preserved after the first pass. It means that authors privileges are not checked any more, so even low-level users were potentially able to execute php via an easy second pass <txp:php /> injection.

Another point: if your code requires more complex calculations, you can register “safe” php functions for use in <txp:evaluate /> via advanced prefs. For date calculations, please look here.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#12 2019-08-14 14:54:27

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,672
Website

Re: txp PHP does not output

etc wrote #319052:

For the record, <txp:php /> has been disabled on the second pass because is_article_body context is not preserved after the first pass.

Yes. I think it’s the right thing to do anyway. I’m glad you found it when tweaking the parser.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#13 2019-08-14 15:05:31

etc
Developer
Registered: 2010-11-11
Posts: 3,198
Website

Re: txp PHP does not output

That was the easiest thing to do, I have not found a way to tell articles content from forms output after the first pass :-/


etc_[ query | search | pagination | date | tree | cache ]

Offline

#14 2019-08-15 03:13:03

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 253
Website

Re: txp PHP does not output

Thank you for all the assistance and input.

Good to know that <txp:php /> being disabled on the second pass has made txp safer. And the new <txp:evaluate /> is awesome!


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

Board footer

Powered by FluxBB