Giter VIP home page Giter VIP logo

statehood's Introduction

@hapi/statehood

HTTP State Management Utilities.

statehood's People

Contributors

arb avatar cjihrig avatar devinivy avatar dominykas avatar hueniverse avatar identityclash avatar jarrodyellets avatar jaw187 avatar lloydbenson avatar lukasolson avatar marsup avatar nargonath avatar tkh44 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

statehood's Issues

Bourne dependency breaks engine specification of 4.x.x

The package bourne that was introduced a short time ago breaks node versions 4.x.x as the rest operator is not supported in node 4.x.x without a flag.

/var/node/cthulhu/node_modules/bourne/lib/index.js:7
 exports.parse = function (text, ...args) {
                                 ^^^
SyntaxError: Unexpected token ...
  at exports.runInThisContext (vm.js:53:16)
  at Module._compile (module.js:373:25)
  at Object.Module._extensions..js (module.js:416:10)
  at Module.load (module.js:343:32)
  at Function.Module._load (module.js:300:12)
  at Function.cls_wrapMethod [as _load (/var/node/cthulhu/node_modules/newrelic/lib/shimmer.js:257:38)
  at Module.require (module.js:353:17)
  at require (internal/module.js:12:17)
  at Object.<anonymous> (/var/node/cthulhu/node_modules/statehood/lib/index.js:6:16)
  at Module._compile (module.js:409:26)
  at Object.Module._extensions..js (module.js:416:10)
  at Module.load (module.js:343:32)
  at Function.Module._load (module.js:300:12)
  at Function.cls_wrapMethod [as _load] (/var/node/cthulhu/node_modules/newrelic/lib/shimmer.js:257:38)
  at Module.require (module.js:353:17)
  at require (internal/module.js:12:17)
  at Object.<anonymous> (/var/node/cthulhu/node_modules/hapi/lib/connection.js:14:19)
  at Module._compile (module.js:409:26)
  at Object.Module._extensions..js (module.js:416:10)
  at Module.load (module.js:343:32)
  at Function.Module._load (module.js:300:12)
  at Function.cls_wrapMethod [as _load] (/var/node/cthulhu/node_modules/newrelic/lib/shimmer.js:257:38)

Cookies with : in name

As talked about in #56 of hapi-auth-cookie (hapijs/cookie#56), cookies with a colon in their name are causing errors about invalid cookie values. I do not believe that colons are invalid in cookie names, hence this issue.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet.
We recommend using:

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.

exclude()

Takes a cookie string and removes certain name-value pairs.

server.inject - with cookie fails with "HttpOnly;"

When setting a cookie that contains "HttpOnly;" as in the example:

server.inject({
    method: 'GET',
    url: `/?${qs.stringify(qry)}`,
    headers: {
         'Cookie': 'cms-preview-token=<token>; HttpOnly; SameSite=Strict'
    }
})

returns:

{ statusCode: 400,
  error: 'Bad Request',
  message: 'Invalid cookie header' }

stripping HttpOnly; from the string fixes the issue.

Valid cookie is never parsed (even with strictHeader set to false)

I am using hapi to check for the existence of a Drupal session cookie (which uses standard PHP sessions).

Here's a cookie sample:

SSESS9cb1fc0ca1a49c727c541be17760f1e0=BqZEqcKD9uuQySX9rC_OvvQDngN0DMCuF5S44xgcYPE

a cookie like this is property formatted in the header (it can be read by PHP); however, statehood fails to parse it. :(

even when I set strictHeader to false the cookie does not come through.

Other cookies appear fine. I double checked the request headers with request.headers.cookie and the cookie is in the header, but it is not in request.state

Documentation for statehood library

Problem Statement:
Provide documentation for Statehood.

Description:
I am currently using Statehood library for cookie parsing and signing for few projects. So the library has been really useful and providing support for singing, encryption and encoding out of box.

Solution:
I would like to provide a documentation for this library. Will the PR be accepted for this?

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.