The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
File Sanitize / cleaning via Vbulletin
How do I convert this for VBulletin Sanitize (cleaning).
PHP Code:
PHP Code:
|
#2
|
||||
|
||||
Be specific, please.
Quote:
|
#3
|
|||
|
|||
Quote:
thanks for the reply, yes those values are the values from the form. What happens is nothing, it does not upload at all nothing gets moved into the directory. The strangest thing also is I have another part of the script that outputs the files from foreach loop using DIV'S and the vbulletin form code breaks this when I change it , makes everything huge (which I cannot explain). But as soon as I change it back to the $_FILE method it works perfectly? I am just trying for good practice and security to use the built in vbulletin cleaning functions... |
#4
|
|||
|
|||
The clean_gpc function only takes 3 arguments. I've never used the vbulletin functions to do file uploads, but I think you want something like:
Code:
$vbulletin->input->clean_gpc('f', 'fileToUpload', TYPE_FILE); $vbulletin->GPC['fileToUpload']['size'] That is, after calling clean_gpc, the size value would be in $vbulletin->GPC['fileToUpload']['size']. |
Благодарность от: | ||
Mickie D |
#5
|
|||
|
|||
Quote:
I will give that a go once my kids get off the PC... Also when you say 3 arguments, are you talking about GET, POST, FILE ? Or the SIZE, TYPE, ERROR, NAME, etc Thanks again |
#6
|
|||
|
|||
I mean parameters, values you pass to the function, like 'f', 'fileToUpload', TYPE_FILE. In your first post you have 4.
|
#7
|
|||
|
|||
Ah, I see the second code I posted only has 3 arguments allowed
Cheers |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|