1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Conversations titled "..." or similar throw up 403 Forbiddens, can I alter my rule somehow?

Discussion in 'Troubleshooting and Problems' started by lasertits, Mar 9, 2012.

  1. lasertits

    lasertits Active Member


    Wasn't sure where to post this, but I ran into this issue this morning, an individual sent me a conversation but he titled it "...." - XF parsed this into the following URL:


    Now, because of a rule I have that denies access to any .files, when I try to read this conversation I get hit with a 403 forbidden.
    I don't really want to remove that rule just for the sake of the possibility that others will title their conversations, or threads, or anything with just "..." or similar, as if they do they'll be hit with 403 Forbiddens as well.

    Is there an edit I can do to the rule to fix this so it plays nicely with XF? Perhaps my best bet is to just limit it to the root DIR and ignore sub directories, perhaps it'll ignore the conversation URL's...

    I'm a noob with rules such as this, so any insight would be appreciated, thanks!
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I assume it works without the dot?


    I think XF should remove the dot automatically if the URL title is empty. I suggest moving this to bugs.

    Here is a quick file edit to implement this:


    Add the red code:

    	public static function buildIntegerAndTitleUrlComponent($integer, $title = '', $romanize = false)
    		if ($title && self::getTitleForUrl($title, $romanize) && XenForo_Application::get('options')->includeTitleInUrls)
    			# /item-title.id/ (where delimiter is '.')
    			return urlencode(self::getTitleForUrl($title, $romanize)) . XenForo_Application::URL_ID_DELIMITER . intval($integer);
    			return intval($integer);
    Kyle12 and lasertits like this.
  3. lasertits

    lasertits Active Member

    You're right, works without the dot. I'll submit a bug. (y)

Share This Page