Bad HTTP Request

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • digitalpoint
    Senior Member
    • Mar 2004
    • 2573
    • 4.1.x

    Bad HTTP Request

    It appears you guys have some sort of front-end firewall/filtering in place for your web server that disallows SQL to be posted in a message body (probably some overly aggressive system that tries to stop SQL injection attacks). The problem is... well... you can't post certain stuff.

    I'd love to give you an example, but the web server blocks it with a "Bad Request" error.

    Code:
    ############
    ## Posts Source  document IDs 0 - 1,000,000,000 (1B)
    ############
    source postsrc : src
    {
    	sql_query_pre			= TRUNCATE TABLE digitalpoint_sphinx_delta
    	sql_query_range			= SELECT MIN(postid), MAX(postid) FROM post
    	sql_query = \
    		SELECT postid AS doc_id, postid AS primaryid, 1 AS contenttypeid, post.threadid AS groupid, thread.forumid AS groupparentid, \
    			userid, thread.replycount, post.title, pagetext, post.visible, post.dateline, thread.prefixid \
    		FROM post \
    			LEFT JOIN thread ON(thread.threadid = post.threadid) \
    		WHERE postid BETWEEN $start AND $end;
    	sql_attr_uint = primaryid
    	sql_attr_uint = contenttypeid
    	sql_attr_uint = groupid
    	sql_attr_uint = groupparentid
    	sql_attr_uint = userid
    	sql_attr_uint = replycount
    	sql_attr_bool = visible
    	sql_attr_timestamp = dateline
    	sql_query_post =
    }
    
    source postdeltasrc : postsrc
    {
    	sql_range_step = 100000
    	sql_query_pre = 
    	sql_query_range	= SELECT MIN(primaryid), MAX(primaryid) FROM digitalpoint_sphinx_delta WHERE contenttypeid=1
    	sql_query = \
    		SELECT digitalpoint_sphinx_delta.primaryid AS doc_id, digitalpoint_sphinx_delta.primaryid AS primaryid, 1 AS contenttypeid, post.threadid AS groupid, thread.forumid AS groupparentid, \
    			userid, thread.replycount, post.title, post.pagetext, post.visible, post.dateline, thread.prefixid \
    		FROM digitalpoint_sphinx_delta \
    			LEFT JOIN post ON(post.postid = digitalpoint_sphinx_delta.primaryid) \
    			LEFT JOIN thread ON(thread.threadid = post.threadid) \
    		WHERE contenttypeid = 1 AND \
    			primaryid BETWEEN $start AND $end;
    	sql_query_killlist = SELECT primaryid AS kill_id FROM digitalpoint_sphinx_delta WHERE contenttypeid = 1 AND delete_flag = 1;
    }
    
    ############
    ## Threads Source  document IDs 2,000,000,001 - 2,100,000,000 (100M)
    ############
    
    source threadsrc : src
    {
    	sql_query_pre   =
    	sql_query_range = SELECT MIN(threadid), MAX(threadid) FROM thread
    	sql_query = \
    		SELECT (threadid + 2000000000) AS doc_id, threadid AS primaryid, 2 AS contenttypeid, forumid AS groupid, title, thread.visible, dateline, replycount, prefixid, \
    			postuserid AS userid, lastpost \
    		FROM thread \
    		WHERE threadid BETWEEN $start AND $end;
    	sql_attr_uint = primaryid
    	sql_attr_uint = contenttypeid
    	sql_attr_uint = groupid
    	sql_attr_uint = userid
    	sql_attr_timestamp = lastpost
    	sql_attr_bool = visible
    	sql_attr_timestamp = dateline
    	sql_attr_uint = replycount
    	sql_attr_multi = uint tagid from ranged-query;SELECT (contentid + 2000000000) AS doc_id, tagid FROM tagcontent WHERE contenttypeid = 2 AND contentid BETWEEN $start AND $end;SELECT MIN(contentid), MAX(contentid) FROM tagcontent;
    }
    
    source threaddeltasrc : threadsrc
    {
    	sql_query_pre = 
    	sql_query_range = SELECT IF (ISNULL(MIN(primaryid)), 0, MIN(primaryid)), IF (ISNULL(MAX(primaryid)), 0, MAX(primaryid)) FROM digitalpoint_sphinx_delta WHERE contenttypeid=2
    	sql_query = \
    		SELECT (digitalpoint_sphinx_delta.primaryid + 2000000000) AS doc_id, digitalpoint_sphinx_delta.primaryid AS primaryid, 2 AS contenttypeid, thread.forumid AS groupid, thread.title, thread.visible, thread.dateline, thread.replycount, thread.prefixid, \
    			postuserid AS userid, lastpost \
    		FROM digitalpoint_sphinx_delta \
    			LEFT JOIN thread ON(thread.threadid = digitalpoint_sphinx_delta.primaryid) \
    		WHERE contenttypeid = 2 AND \
    			primaryid BETWEEN $start AND $end;
    	sql_attr_multi = uint tagid from ranged-query;SELECT (primaryid + 2000000000) AS doc_id, tagcontent.tagid FROM digitalpoint_sphinx_delta RIGHT JOIN tagcontent ON(tagcontent.contentid = digitalpoint_sphinx_delta.primaryid) WHERE digitalpoint_sphinx_delta.contenttypeid = 2 AND primaryid BETWEEN $start AND $end;SELECT IF (ISNULL(MIN(primaryid)), 1, MIN(primaryid)), IF (ISNULL(MAX(primaryid)), 1, MAX(primaryid)) FROM digitalpoint_sphinx_delta WHERE contenttypeid=2;
    	sql_query_killlist = SELECT (primaryid + 2000000000) AS kill_id FROM digitalpoint_sphinx_delta WHERE contenttypeid = 2 AND delete_flag = 1;
    }
    Sphinx Search for vBulletin 4: https://marketplace.digitalpoint.com...tin-4.870/item
    Someone send me a message on Twitter when this site is usable again. https://twitter.com/digitalpoint
  • Brandon_R
    Banned
    • Aug 2009
    • 243

    #2
    Happens to me randomly also but the thing is i haven't been posting any MYSQL statements.

    Comment

    • Paul M
      Former Lead Developer
      vB.Com & vB.Org
      • Sep 2004
      • 9886

      #3
      This issue has been around for over a week and has been hampering us at vb.org - its been reported to IB, and we keep chasing it.
      Baby, I was born this way

      Comment

      • Paul M
        Former Lead Developer
        vB.Com & vB.Org
        • Sep 2004
        • 9886

        #4
        I believe its now been tracked and fixed.
        Baby, I was born this way

        Comment

        Related Topics

        Collapse

        Working...