![]() |
Disable conditional function filters
This hack will allow you to by-pass the function filters built into the template conditional's. Currently you are restricted to the following functions:
PHP Code:
PHP Code:
This hack is ment to be used on test boards for functionality testing, do not run it in production enviroments. |
mm coolies
/me runs off to test |
i'm not sure to understand here... do you have a patent example before i put this in ?
|
Quote:
This is just something to make it a little eaiser on developers, I found it to save some time while developing with vBulletin on local test copies. |
ok then... (i never code inside the templates, i prefer directly into files, so anyway...)
|
Checking with the templates has its benifits in some cases, lets say I created some new functions to be used to display differing html inside forums depending on what the forumid is.
So lets asume I have two functions i've inserted into functions.php: PHP Code:
HTML Code:
<if conditional="match_forums($forumid)"> PHP Code:
|
Nice.
Unless there are cases where the user can inject code, the default should be less restrictive. It is very handy to have more power on the template side. |
Excellent work - what a great thought!
|
It's so simple and i didn't come across the idea myself. ^^
|
Excellent stuff Brad!! Will be using it from now on.
|
You can execute any PHP function without requiring a mod, simply by inserting something between the name of the function and the parenthesis of the argument list.
For example, the following examples will work fine: Code:
|
Good job thanks ;)
|
@Car: have you reported this as a bug?
|
Quote:
In all the time that vB has been used at sites, I doubt very strongly that anyone has done this accidently. BTW, I think that one could probably go as far as defining and running functions in a template, if one was so twisted. :) |
Well, but it IS a bug and therefore it should be reported in my eyes.
The defs will then say themselve if they want to fix it or not. Actually i see a reason for it. Because why are some functions not allowed is because they didn't want to let every admin change the permissions themselves, but with that bug, it's easyli possible, and therefore it's a security problem (still normally if you make someone and admin, you should trust him that far, but hey, i have not designed the permission system ;)) |
The permission system has little to do with this imo. If you make someone an admin, they hardly need to mess about with writing funky template conditionals to subvert permissions. By definition, if you give AdminCP access to someone who can overwrite template, with or without conditionals, it is someone you trust.
The list of allowed functions is pretty silly anyway. Why aren't the hundred other benign PHP functions allowed? I mean, what damage can one do with 'strlen(...)'. Anyway, we need not argue. If you think it is a bug, you know what to do. :) Cheers |
I meant the Adminpermission system.
Why have it if those admins can change them themselves ;) but as you already said, it's nothing we have to argue about, i'll just report it and we'll see what the dev's think about. |
Was to stop people putting backdoors into styles, you make a nice style with a backdoor and post it on your website and an unsuspecting admin installs it.
Its easy to see hacks with backdoors but if you think about styles, there could be 1000's of lines of code. |
All times are GMT. The time now is 07:17 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|