Giter Club home page Giter Club logo

Comments (4)

reid avatar reid commented on July 16, 2024

I also have this issue. Tested [email protected] and [email protected] because travelogue does not support hapi 5.x.x.

To reproduce:

  1. Create a yar session, e.g. in your browser.
  2. Change the yar password.
  3. Make another request with the same cookies.
  4. hapi's state handler will fail to parse the cookies. This causes the onPreAuth event to be skipped.
  5. The request.session was never setup by yar's onPreAuth handler, so it will be null by the time onPreResponse comes around.
  6. The server crashes.

Example trace:

Debug: hapi, state, error
    {"name":"session","value":"Fe26.2**cafedbad","settings":{"isSecure":false,"isHttpOnly":false,"path":"/","domain":null,"ttl":null,"encoding":"iron","password":"WAT"},"reason":"Bad hmac value"}

/app/node_modules/yar/lib/index.js:181
        if (!request.session._isModified &&
                            ^
TypeError: Cannot read property '_isModified' of null
    at /app/node_modules/yar/lib/index.js:181:29
    at /app/node_modules/hapi/lib/handler.js:389:22
    at iterate (/app/node_modules/hapi/node_modules/async/lib/async.js:149:13)
    at Object.async.eachSeries (/app/node_modules/hapi/node_modules/async/lib/async.js:165:9)
    at /app/node_modules/hapi/lib/handler.js:372:15
    at internals.Protect.run (/app/node_modules/hapi/lib/protect.js:53:5)
    at Object.exports.invoke (/app/node_modules/hapi/lib/handler.js:370:22)
    at internals.Request._reply (/app/node_modules/hapi/lib/request.js:350:13)
    at /app/node_modules/hapi/lib/request.js:318:18
    at /app/node_modules/hapi/node_modules/async/lib/async.js:151:21

from yar.

chmanie avatar chmanie commented on July 16, 2024

Nice. Are you going to create a PR for that?

from yar.

reid avatar reid commented on July 16, 2024

I already did: #36

:)

On May 22, 2014, at 7:52 AM, Christian Maniewski [email protected] wrote:

Nice. Are you going to create a PR for that?


Reply to this email directly or view it on GitHub.

from yar.

lock avatar lock commented on July 16, 2024

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

from yar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.