Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 16 Jun 2015, 09:14
Mickie D Mickie D is offline
 
Join Date: Jun 2002
File Sanitize / cleaning via Vbulletin

How do I convert this for VBulletin Sanitize (cleaning).


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I tried this but it breaks the page


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Thank you.
__________________
Digitalworldz Satellite Cable TV Forums
Cable, Satellite, Consoles, Mobile Phones, Audio Visual, and general chat
Reply With Quote
  #2  
Old 16 Jun 2015, 09:39
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Real name: Sven
Originally Posted by Mickie D View Post
it breaks the page
Be specific, please.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
You did replace 'fileToUpload' and 'size' with the variables that contain the actual values, did you?
__________________
Please note that there will be no further updates to my addons, especially they will not be upgraded for vB5. I'm leaving vB, since IB choose to go the banana-way yet again.

http://www.roma-antiqua.de
Reply With Quote
  #3  
Old 16 Jun 2015, 10:00
Mickie D Mickie D is offline
 
Join Date: Jun 2002
Originally Posted by cellarius View Post
Be specific, please.


You did replace 'fileToUpload' and 'size' with the variables that contain the actual values, did you?

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...
__________________
Digitalworldz Satellite Cable TV Forums
Cable, Satellite, Consoles, Mobile Phones, Audio Visual, and general chat
Reply With Quote
  #4  
Old 16 Jun 2015, 17:12
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


That is, after calling clean_gpc, the size value would be in $vbulletin->GPC['fileToUpload']['size'].
Reply With Quote
  #5  
Old 16 Jun 2015, 18:43
Mickie D Mickie D is offline
 
Join Date: Jun 2002
Originally Posted by kh99 View Post
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


That is, after calling clean_gpc, the size value would be in $vbulletin->GPC['fileToUpload']['size'].

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
__________________
Digitalworldz Satellite Cable TV Forums
Cable, Satellite, Consoles, Mobile Phones, Audio Visual, and general chat
Reply With Quote
  #6  
Old 16 Jun 2015, 18:50
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
I mean parameters, values you pass to the function, like 'f', 'fileToUpload', TYPE_FILE. In your first post you have 4.
Reply With Quote
  #7  
Old 16 Jun 2015, 18:53
Mickie D Mickie D is offline
 
Join Date: Jun 2002
Ah, I see the second code I posted only has 3 arguments allowed

Cheers
__________________
Digitalworldz Satellite Cable TV Forums
Cable, Satellite, Consoles, Mobile Phones, Audio Visual, and general chat
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 15:53.

Layout Options | Width: Wide Color: