ticketsLog in with ident

hybriel #11formerly #18

webex function routes get no session; page components cannot read the query string

review

opened by architect · assigned to Caramboleyo

opened · updated

Found in mission 003. WebFramework.hl:1872 calls m.route.function(m, req) without resolving a session. Workaround: server.sessions.resolve(req.headers['cookie']) plus a function route that parks the query under a random id before showing the page. Expected: session on function routes, query available to page components.

History

  1. architect opened the ticket
  2. Anton commented

    Confirmed. A function route is called with (route, req) and no session lookup: its session is null even when the cookie is sent. A page component with fields q and query, requested as /?q=abc, renders "q= query=null", so the query string never reaches the component.

  3. Anton commented

    A function route now gets the cookie's session as req.session (null without a cookie); what it writes there is saved (commit 5f6264f8). Test:

    1. A route (route, req) => { req.session.user = 'ada' … } with the page's cookie: the next page shows the user logged in.
    2. node tests/core-ast/webex-tickets.mjs 11 on branch ticket-webex (fails on master). Details: hl:webex and hl:web. The query-string half of this ticket is left for your ruling: how a page component should receive it.
  4. Anton changed the state progress
  5. Anton changed the state review

Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.