Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #31  
Old 07-26-2005, 04:38 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nope
Reply With Quote
  #32  
Old 07-26-2005, 04:43 PM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
      //Display edit
        
$sql mysql_query("SELECT * FROM user_webpage WHERE userid = ".GBUSERID."");
        while(
$row mysql_fetch_assoc($sql)) { 
or

PHP Code:
   //Continue displaying what was found
        
while($row mysql_fetch_assoc($sql)) { 
or

PHP Code:
            $webpage['name'] = stripslashes($row['name']);
            if(
$row['lastupdate'] =="") {
                
$webpage['lastupdate'] = $vbphrase['wg_never'];
            } else {
                
$webpage['lastupdate'] = date("".$vboptions['dateformat']." ".$vboptions['timeformat'].""$row['lastupdate']);
            }
            
$webpage['description'] = stripslashes($row['description']);

            
$webpage['text'] = stripslashes($row['text']); 
or


PHP Code:
            //Check text-formatting settings
            
$settingvbcode iif($row['vbcodeorhtml'] == 'vbcode' AND $vboptions['webpageallowvbcode'] == '1''1''0');
            
$settinghtml iif($row['vbcodeorhtml'] == 'html' AND $vboptions['webpageallowhtml'] == '1''1''0');
            if(
$settinghtml == AND $settingvbcode == 0) {
                
$settingvbcode 1;
            }
            
            if(
$vboptions['webpagesmilies'] == and $row['usesmilies'] == 1) {
                
$settingsmilies 1; } else { $settingsmilies 0; }
            
            if(
$settingvbcode == 1) {
                
$webpage['text'] = parse_bbcode2($webpage['text'], $settinghtml1$settingsmilies$settingvbcode);
            }
            if(
$settinghtml == 1) {
                
//Remove scripts!!!
                
$webpage['text'] = preg_replace("/(\<script)(.*?)(script>)/si"""$webpage['text']);
                
//Don't hide anything!
                
$webpage['text'] = str_replace("<!--""&lt;!--"$webpage['text']);
                
//Allow specified tags (if empty in admin, ALL tags are allowed! SECURITY RISK!)
                
if($settinghtml == && !empty($vboptions['allowedhtmltags'])) {
                    
$webpage['text'] = strip_tags($webpage['text'], $vboptions['allowedhtmltags']);
                }
            }
            
            
//Javascript will not be allowed
            
$webpage['text'] = ereg_replace("~<script[^>]*>.+</script[^>]*>~isU"""$webpage['text']); 
            
            
$webpage['hits'] = $row['hits'];
            
$webpage['bgcolor'] = $row['bgcolor'];
            
$webpage['bordersize'] = $row['bordersize'];
            
$webpage['bordercolor'] = $row['bordercolor'];
            
$webpage['fontface'] = $row['fontface'];
            
$webpage['fontsize'] = $row['fontsize'];
            
$webpage['fontcolor'] = $row['fontcolor']; 
Reply With Quote
  #33  
Old 07-26-2005, 04:46 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it's the top one, am i to assume you're not using vB?
Reply With Quote
  #34  
Old 07-26-2005, 04:48 PM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

actually i am, that was in member.php...... im not sure if the code needs to be changed here or in profile.php (perhaps profile fields are filtered while they are submitted), but thats where u come in i guess...
Reply With Quote
  #35  
Old 07-26-2005, 05:04 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have no idea what a profile field has to do with any of the $webpage/$row query?

regarding that stuff, that's in no member.php i've ever seen i suggest you vBulletinize it.

regarding the profile fields if you add the query to the page then whatever sanitizing is happening is evaded.
Reply With Quote
  #36  
Old 07-26-2005, 05:09 PM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$webpage/$row query has nothign to do with profile fields

$webpage/$row query = a hack that i have installed (webpage and guestbook)

the webpage and guestbook hack follows its own html rules in which you can edit via admincp

i am trying to make it so that THE PROFILE FIELDS FOLLOW THE SAME RULES

or so that PROFILE FIELDS ARE ALLOWED TO USE HTML ACCEPT FOR MALICIOUS CODES SUCH AS <SCRIPT>
Reply With Quote
  #37  
Old 07-26-2005, 05:22 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

then why not just due the $webpage[text] rows and replace $webpage[text] with $whatever[fieldx]?
Reply With Quote
  #38  
Old 07-26-2005, 05:33 PM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$whatever[fieldx] that means id have to do this code in member.php for as many fields as i want to allow html for or will [fieldx] be abole to be used for any field?

AND HOW WOULD I DO THIS?


[HIGH]TRIED SOMETHING DIFF[/HIGH]

Ok so far i have tried the following in order to allow and limit html

I have tried editing functions_user.php and doing the following edit


In ./functions_user.php

FIND

PHP Code:
$userfields .= ", $varname = '" addslashes(htmlspecialchars_uni($$varname)) . "'"
REPLACE WITH

PHP Code:
// MOD :: ALLOW HTML IN PROFILEFIELDS
// OLD CODE
// $userfields .= ", $varname = '" . addslashes(htmlspecialchars_uni($$varname)) . "'";
// NEW CODE
$userfields .= ", $varname = '" addslashes($$varname) . "'";
// END OF MOD 
And then after that.... before this code in member.php

PHP Code:
eval('$customfields .= "' fetch_template('memberinfo_customfields') . '";'); 
I tried adding this:

PHP Code:
            $userinfo['$profilefieldname'] = strip_tags($userinfo['$profilefieldname'], "<b><i><u>");  

                 
$profilefieldname strip_tags($profilefieldname"<b><i><u>");  
            
            
$userinfo['value'] = strip_tags($userinfo['value'], "<b><i><u>"); 
 
            
$post['$profilefieldname'] = strip_tags($post['$profilefieldname'], "<b><i><u>");  

            
$profilefield['value'] = strip_tags($profilefield['value'], "<b><i><u>"); 
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 02:07 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03877 seconds
  • Memory Usage 2,278KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (8)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete