vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Messed up RSS2 external file (https://vborg.vbsupport.ru/showthread.php?t=177131)

steveneff 04-25-2008 12:10 PM

Messed up RSS2 external file
 
I have the DaniWeb style rewrite on my vbulletin and decided to add these to external.php. After making the edits it worked fine at first but the RSS2 feed had two sets off links (RSS1 is OK), one with the original urls and another with the new urls. I left this thinking It would correct itself once a few new post?s had been added.
After a while when I checked the feed it still had both sets of urls, hadn?t updated and reported an error at the top ?Internet Explorer was unable to update this feed and will try again later.? I uploaded the original file but this did not fix the error, so again put my edited version back up thinking it may sort itself.

In the early hours this morning I had a massive attack on my forums that I fended off with the htaccess ?deny from? and went to bed.

This morning I checked my RSS2 feed and it still has the error, I also got some email?s about database error?s (around the time of the attack) from the RSS

Quote:

Database error in vBulletin :

Invalid SQL:

SELECT *
FROM datastore
WHERE title IN ('','options','bitfields','attachmentcache','forum cache','usergroupcache','stylecache','languagecach e','products','pluginlist','cron','profilefield');

MySQL Error : Lost connection to MySQL server during query Error Number : 2013
Date : Friday, April 25th 2008 @ 05:03:05 AM
Script : /forums/external.php?type=RSS2
Referrer :
IP Address : 86.0.133.9
Username :
Classname : vB_Database
Quote:

Database error in vBulletin 3.6.9:

Invalid SQL:

SELECT *
FROM session
WHERE userid = 0
AND host = '66.249.70.146'
AND idhash = 'b7a7a78a0f0ab05079e72c6a96628b62'
LIMIT 1;

MySQL Error : Lost connection to MySQL server during query Error Number : 2013
Date : Friday, April 25th 2008 @ 05:03:20 AM
Script : /forums/calendar.php?do=add&c=1&day=2001-12-1
Referrer :
IP Address : 66.249.70.146
Username :
Classname : vB_Database
Are these error?s just part of the attack and I should ignore them or are they part of my messed up external.php mod?
Is it possible to flush the externall.php feeds from the database to have a fresh look at the output?
Is there anything obvious I may have done wrong changing the urls in external.php?

Thanks for your help.

--------------- Added [DATE]1209130790[/DATE] at [TIME]1209130790[/TIME] ---------------

Edits I made in external.php

Original
PHP Code:

case 'RSS':
                    
$xml->add_group('item');
                        
$xml->add_tag('title'unhtmlspecialchars($thread['title']));
                        
$xml->add_tag('link'$vbulletin->options['bburl'] . "/showthread.php?t=$thread[threadid]&goto=newpost", array(), falsetrue); 

Changed to
PHP Code:

case 'RSS':
                    
$xml->add_group('item');
                        
$xml->add_tag('title'unhtmlspecialchars($thread['title']));
                        
$xml->add_tag('link'$vbulletin->options['bburl'] . "/thread$thread[threadid].html", array(), falsetrue); 


Original
PHP Code:

case 'RSS1':
                    
$xml->add_group('item', array('rdf:about' => $vbulletin->options['bburl'] . "/showthread.php?t=$thread[threadid]"));
                        
$xml->add_tag('title'unhtmlspecialchars($thread['title']));
                        
$xml->add_tag('link'$vbulletin->options['bburl'] . "/showthread.php?t=$thread[threadid]&goto=newpost", array(), falsetrue); 

Changed to
PHP Code:

case 'RSS1':
                    
$xml->add_group('item', array('rdf:about' => $vbulletin->options['bburl'] . "/thread$thread[threadid].html"));
                        
$xml->add_tag('title'unhtmlspecialchars($thread['title']));
                        
$xml->add_tag('link'$vbulletin->options['bburl'] . "/thread$thread[threadid].html", array(), falsetrue); 


Original
PHP Code:

case 'RSS2':
                    
$xml->add_group('item');
                        
$xml->add_tag('title'unhtmlspecialchars($thread['title']));
                        
$xml->add_tag('link'$vbulletin->options['bburl'] . "/showthread.php?t=$thread[threadid]&goto=newpost", array(), falsetrue); 

Changed to
PHP Code:

case 'RSS2':
                    
$xml->add_group('item');
                        
$xml->add_tag('title'unhtmlspecialchars($thread['title']));
                        
$xml->add_tag('link'$vbulletin->options['bburl'] . "/thread$thread[threadid].html", array(), falsetrue); 


Original
PHP Code:

$xml->add_tag('category'unhtmlspecialchars($vbulletin->forumcache["$thread[forumid]"]['title_clean']), array('domain' => $vbulletin->options['bburl'] . "/forumdisplay.php?f=$thread[forumid]"));
                    
$xml->add_tag('dc:creator'unhtmlspecialchars($thread['postusername']));
                    
$xml->add_tag('guid'$vbulletin->options['bburl'] . "/showthread.php?t=$thread[threadid]", array('isPermaLink' => 'true')); 

Changed to
PHP Code:

$xml->add_tag('category'unhtmlspecialchars($vbulletin->forumcache["$thread[forumid]"]['title_clean']), array('domain' => $vbulletin->options['bburl'] . "/forum$thread[forumid].html"));
                    
$xml->add_tag('dc:creator'unhtmlspecialchars($thread['postusername']));
                    
$xml->add_tag('guid'$vbulletin->options['bburl'] . "/thread$thread[threadid].html", array('isPermaLink' => 'true')); 


Dismounted 04-25-2008 12:44 PM

The error indicates that in the middle of a query, the MySQL daemon cut the connection or shut down. It was probably part of the attack and it has probably restarted now.

steveneff 04-25-2008 01:02 PM

Few, half way there, thanks dismounted, any idea's about the external.php RSS2 problem?

--------------- Added [DATE]1209136420[/DATE] at [TIME]1209136420[/TIME] ---------------

after uploading my updated external.php again this does now look to be working ok(maybe things got messed up as I was working on this when I got attacked).
It still has some duplicate post's because of the old urls but new post's are comming through on there own(new daniweb url only), so I guess the old urls will clear out in time. It would be nice if there was a way to clear them now.


*Warning*

If anyone else using the DaniWeb rewrite want's to make these edit's, you may want to replace the goto=newpost urls with the newpostinthread url, I didn't because I don't see the point in going to new post in thread, I just want the threads listed.

--------------- Added [DATE]1209136896[/DATE] at [TIME]1209136896[/TIME] ---------------

The old urls have now gone, they may have only been there because I was subcribed to the feed, after I unsubscribed they disapered.


All times are GMT. The time now is 10:51 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
  • Page Generation 0.01107 seconds
  • Memory Usage 1,779KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete