Skip to content

- a little hack to enable custom request decryption - #86

Open
vietanh85 wants to merge 6 commits into
expressjs:masterfrom
vietanh85:master
Open

vietanh85 wants to merge 6 commits into
expressjs:masterfrom
vietanh85:master

Conversation

@vietanh85

Copy link
Copy Markdown
  • Sometime we need to encrypt response and request from client to server to ensure security

@vietanh85 vietanh85 changed the title - a little hack to enable custom request description - a little hack to enable custom request decryption Mar 25, 2015
@dougwilson

Copy link
Copy Markdown
Contributor

Makes sense. Can the decryption be done as a stream instead of a sync decryption?

@dougwilson dougwilson added the pr label Mar 25, 2015
@dougwilson dougwilson self-assigned this Mar 25, 2015
@vietanh85

Copy link
Copy Markdown
Author

Since, we are using raw-body to convert request stream to a buffer. In addition, I've learned that, there is no way to modify a readable stream in nodejs. So I think we cannot decrypt a stream.

@dougwilson

Copy link
Copy Markdown
Contributor

I'm talking about changing the interface here to take a TransformStream, rather than do it prior to calling this module.

@dougwilson

Copy link
Copy Markdown
Contributor

Ok, sorry we misunderstood. The user needs to pass in a TransformStream as the decrypt argument. What we have here is still the same DoS vector.

@dougwilson

Copy link
Copy Markdown
Contributor

And if possible, please add tests and make sure decryption occurs after inflation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants