string escape bug



  • How to reproduce:

    1. register a normal user account. Let's say the email is abc@example.com
    2. insert \b at the beginning of the email string: \babc@example.com

    In homepage, there is a piece of javascript :
    <script>
    var RELATIVE_PATH = "";
    var config = JSON.parse('{"relative_path":"","version":"1.4.5","siteTitle":"NodeBB","browserTitle":"NodeBB","titleLayout":"{pageTitle} JSON.parse('{"username":"xxxx","userslug":"xxxx","email":"\babc@example.com", ...
    };
    </script>

    \b won't pass json validator and will cause unexpected behaviors.

    See also:
    https://community.nodebb.org/topic/10524/bug-report-json-parse-error


  • Global Moderator

    @andy1247008998 what browser are you on? It seems to work just fine in Chrome. This could possibly be a bug with your browser.


Log in to reply
 

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.