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

Fixed IDN name on Firefox - cannot post reply

Discussion in 'Resolved Bug Reports' started by tia, Oct 1, 2014.

  1. tia

    tia Member

    I am not sure this affects all IDN names or not, but we are running a new site at http://สภากาแฟ.net i.e.
    http://xn--12c4db3b2bb9h.net and all Firefox users cannot post any reply.

    I have isolated the problem by adding a CNAME and create new URL at http://test.serithai.net that point to the same Xenforo installation, and it works fine on my Firefox while the IDN's URL still not working.

    Feel free to try at the specified URLs if you need to.

    Edit: I set network.IDN_show_punycode to true in Firefox's about:config and it works.
    Last edited: Oct 1, 2014
  2. tia

    tia Member

  3. Mike

    Mike XenForo Developer Staff Member

    This feels like a Firefox bug, but I'm not sure.

    First, IMO, the browser accessing URLs via JS as their Unicode version seems really unintuitive. There's an implication that this is as per the spec, the other browsers don't follow it. That's not actually the core problem.

    The error was actually coming from us sending through window.location.href as a header and FF refusing to encode it because it contained values outside the basic ASCII range. (The docs don't seem to cover that this is supposed to be a byte string.) Of course, this comes from accessing the Unicode URL.

    I've managed to work around this by replacing the Unicode URL with the Punycode version in a couple places.
  4. tia

    tia Member


    Firefox dev insisted that they got it right by specification, and WebKit got it wrong. I guess we must find some way to survive in their conflict.

    If you already finished the workaround, could you probably give me the patch? The issue is blocking me now.
  5. Mike

    Mike XenForo Developer Staff Member

    I've attached the patch. The xenforo.js file is normally minified and combined with some others so unfortunately it may not be trivial to apply. (You'll see the unminified file as well; I believe you need to combine it with the jQuery "rollup" file.)

    Attached Files:

  6. tia

    tia Member

    Thank you very much! It is working now. I don't know how to minify it correctly so I will use /full version for now and wait for the next release. Thanks again for fixing this very quickly.

Share This Page