• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 3.x Series
    • Bug
    • Infinite loop "Moved permanently 302"

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Infinite loop "Moved permanently 302"

    • Issue Tools
      • View Changes
    1. issueid=1942 August 21, 2010 9:22 PM
      lordsilence lordsilence is offline
      Junior Member
      Infinite loop "Moved permanently 302"
      Putting vbulletin on a SSL enabled backend causes infinite loop

      This is going to be a really obscure bug.

      Basicly. Our setup looks like this

      Vbulletin is served by a backend with a reverse proxy infront of a caching proxy.
      The reverseproxy is SSL enabled while the caching proxy is not.

      Reverse proxy (HTTPS) -> caching proxy (HTTP) -> backend (HTTP)

      If the url for forum path to showwiki in admincp configuration for vaultwiki is set to https://domain/forums
      the showwiki.php will loop back onto the https enabled host location header.

      Proposed fix is to not rely on the current redirect method that rewrites headers for linking a user to the wiki article as this causes an infinite url redirect with varnish as caching proxy.
    Issue Details
    Issue Number 1942
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category Infinite Loops
    Status Fixed
    Priority 5 - Minor Bugs / Small Tweaks
    Affected Version 3.0.2
    Fixed Version 3.0.4
    Milestone VaultWiki 3.0.5
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. August 21, 2010 10:34 PM
      pegasus pegasus is offline
      VaultWiki Team
      Obscure bugs are my favorite. I haven't really read up on the topic, so whether this is a real fix depends if search engines consider https://url and http://url to be different URLs. For now, this edit should cause the canon-check to ignore the protocol.

      In vault/plugins/showwiki.php, find:
      Code:
      		$compurl = special_fetch_url($vbulletin->options['vault_seo']);
      Add after:
      Code:
      		$compurl = end(explode('://', $compurl, 2));
      		$testurl = end(explode('://', $threadinfo['url'], 2));
      Find:
      Code:
      			strpos($compurl, $threadinfo['url']) === false OR
      Replace with:
      Code:
      			strpos($compurl, $testurl) === false OR
      Reply Reply  
    2. August 22, 2010 1:56 PM
      lordsilence lordsilence is offline
      Junior Member
      Done the edits.

      However the last "Replace with:" is the same as the "find"

      Code:
      strpos($compurl, $threadinfo['url']) === false OR
      Reply Reply  
    3. August 22, 2010 2:05 PM
      lordsilence lordsilence is offline
      Junior Member
      An update, I changed to http://forumurl in admincp to make the wiki show again since the update you posted didnt solve the issue.
      But I noticed that editing articles since the form submit tries to send the POST data to the http:// url is still broken with the http:// link in config.

      So it need to be omitted here as well or check which rerring header is used:

      See post data:

      Code:
      HEADER
      http://www.domain/forums/showwiki.php?title=Devoter&do=edit
      
      POST /forums/showwiki.php?title=Devoter&do=edit HTTP/1.1
      Host: www.domain
      User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; sv-SE; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7
      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
      Accept-Language: sv-se,sv;q=0.8,en-us;q=0.5,en;q=0.3
      Accept-Encoding: gzip,deflate
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
      Keep-Alive: 115
      Connection: keep-alive
      Cookie: OMITTED
      Content-Type: application/x-www-form-urlencoded
      Content-Length: 1495
      message=%5Bcategory%5DWIKI ARTICLE OMITTED (censored from post data)&wysiwyg=0&reason=&edittitle=Devoter&forumheader=&meta_description=&iconid=0&s=&securitytoken=XXXXXXXXXX-XXXXXXXXXa&do=edit&action=updatepost&section=&posthash=e2f4940e09696841a69c541138182ecc&poststarttime=1282499487&loggedinuser=316&sbutton=Save+Changes&parseurl=1&disablesmilies=1&emailupdate=0
      HTTP/1.0 302 Found
      Location: https://www.domain/forums/showwiki.php?title=Devoter&do=edit
      Content-Type: text/html
      Content-Length: 264
      Reply Reply  
    4. August 22, 2010 2:11 PM
      lordsilence lordsilence is offline
      Junior Member
      As for SEO:ing.
      Google and search engines doesnt make a difference to protocol
      Reply Reply  
    5. August 22, 2010 2:22 PM
      pegasus pegasus is offline
      VaultWiki Team
      Sorry about the edit. If you see my above post again, the second "replace with" should now solve the issue.
      Reply Reply  
    6. August 22, 2010 2:44 PM
      lordsilence lordsilence is offline
      Junior Member
      Thanks

      And the article editing fixed itself when I changed to https:// in the config again after the code fixes.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 10:08 AM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.