• NodeBB

    What happens when you try to login after you get logged out? 403? 500?

  • Plugin & Theme Dev

    I've disabled the cache for this (request-header Cache-Control:no-cache) but without that the same result: 200.

    General

    Remote Address:[::1]:4567
    Request URL:http://localhost:4567/login?local=1
    Request Method:POST
    Status Code:200 OK
    

    Response Headers

    Connection:keep-alive
    Content-Length:6
    Content-Type:text/html; charset=utf-8
    Date:Sat, 18 Jul 2015 15:13:14 GMT
    ETag:W/"6-EfazKFv3GoeBHD2tzLexZg"
    set-cookie:express.sid=s%3AKZKFhtm5od-ur_JBgNkN1mZk-_MgogOF.r%2BamgtRRL1d%2Bun5NbhOxIuBW1W%2FJx7WAv9xp01UorXo; Path=/; Expires=Sat, 01 Aug 2015 15:13:14 GMT; HttpOnly
    Vary:Accept-Encoding
    X-Frame-Options:SAMEORIGIN
    X-Powered-By:NodeBB
    

    Request Headers

    Accept:*/*
    Accept-Encoding:gzip, deflate
    Accept-Language:en-US,en;q=0.8,de;q=0.6
    Cache-Control:no-cache
    Connection:keep-alive
    Content-Length:113
    Content-Type:application/x-www-form-urlencoded; charset=UTF-8
    Cookie:org.cups.sid=6592779d4f2a1725f4c410957b3ffef2; connect.sid=s%3AR0QEUPdPVSiS5tazLC8bkdhtLmjyYEnp.Q5Eucy7fsCVN22WViBWuZaWgmOzhFKrayNvnkdYuleY; express.sid=s%3AKZKFhtm5od-ur_JBgNkN1mZk-_MgogOF.r%2BamgtRRL1d%2Bun5NbhOxIuBW1W%2FJx7WAv9xp01UorXo
    Host:localhost:4567
    Origin:http://localhost:4567
    Pragma:no-cache
    Referer:http://localhost:4567/login?local=1
    User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36
    x-csrf-token:CgqEiLEc-Cq3OXMXAyRURBWlCuo0Ep_tvsEU
    X-Requested-With:XMLHttpRequest
    

    Query String Parameters

    local:1
    

    Form Data

    username:frissdiegurke
    password:***
    remember:on
    returnTo:http://localhost:4567/login?local=1
    

    I've also tried with other returnTo value (http://localhost:4567/tags) but same result 200 and redirect to /login?local=1

    EDIT: After cleaning cookies (more specific express.sid) I can login again but as soon I try to access /admin it's the same all over again.

  • Plugin & Theme Dev

    The request to /admin itself when logged in (and avatar is showed, etc.) results in a 302 as it seems:

    General

    Remote Address:[::1]:4567
    Request URL:http://localhost:4567/admin
    Request Method:GET
    Status Code:302 Moved Temporarily
    

    Response Headers

    Connection:keep-alive
    Content-Length:84
    Content-Type:text/html; charset=utf-8
    Date:Sat, 18 Jul 2015 15:41:47 GMT
    Location:/login?local=1
    set-cookie:express.sid=s%3ASnR2fDlqTEBDunA6DAyurgERQy9LvZwj.jmjluB9kDCE%2BSEhCtxTpzgcakpjJa%2BKOpuFYYSgtmIo; Path=/; Expires=Sat, 01 Aug 2015 15:41:47 GMT; HttpOnly
    Vary:Accept, Accept-Encoding
    X-Frame-Options:SAMEORIGIN
    X-Powered-By:NodeBB
    

    Request Headers

    Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
    Accept-Encoding:gzip, deflate, sdch
    Accept-Language:en-US,en;q=0.8,de;q=0.6
    Cache-Control:no-cache
    Connection:keep-alive
    Cookie:express.sid=s%3ABq2PBi6iT5jaRQ6Qg3ojLy9PyWB0dRe6.VgpaSnS%2B%2BvdTxoJkxieZgw4ZpOWzUxJZOOH%2BWygCNqw; express.sid=s%3AYryeHEojKdlk3cc9SBmIegkusB9GeJ70.wJ5jXbD5oqvrygsWvUKMbq8mVJGIXrprt%2F%2F3OAH0jn0
    Host:localhost:4567
    Pragma:no-cache
    Referer:http://localhost:4567/unread
    User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36
    

    Maybe the two different express.sid request-cookies have sth to do with this o_O

  • NodeBB

    Can you try switching the session store to redis and see if that helps?

  • Plugin & Theme Dev

    I've used redis in first place, just switched to mongodb for debugging purpose since I'm not familiar with redis commands.
    So everything happens using redis the same way.

  • GNU/Linux Admin

    Highly peculiar... and does this also happen on, say... a cloud install?

  • NodeBB

    @frissdiegurke Does this happen with node 0.10.x?

  • Plugin & Theme Dev

    @baris said:

    @frissdiegurke Does this happen with node 0.10.x?

    Since there is no way to install node 0.10.x (neither iojs, wanted to try this 😄 ) without purging my current version I'm not willing to do this.

    I've just tried to remove all global installed node_modules (rm -rf /usr/lib/node_modules), clean npm cache and reinstall npm and my global modules.
    But it still didn't fix the problem (fixed some non-related errors though).

    I'll try on my desktop-pc (also bleeding-edge arch-linux) later this day to see if it works there.

  • GNU/Linux Admin

    You could try installing nvm, which would allow you to "install" Node from within your home directory...

    Then you can switch between 0.10, 0.11, 0.12, and even iojs, with a single nvm use command.

    Of course, you do have to npm rebuild each time, but that's not so bad.

  • Plugin & Theme Dev

    @julian well, that's affordable 😄 didn't know nvm thanks!

    Using nodejs v0.10.40 (npm 1.4.28) and npm rb within NodeBB root, flushing db and calling ./nodebb setup again... The issue still persists o_O

    I've also tried the v0.6.x branch (using nodejs 0.12.x) where the same issue occurs, so it's definitely no fault within the NodeBB core (unless caused by lately bugfixes within that branch too)...

    As I said I'll test on desktop-pc later on. Maybe I'll also try around with docker some time (never used it yet, definitely need to xD ).

  • GNU/Linux Admin

    Eh, try LXC. I recommend it over Docker 😄

Suggested Topics

| |