Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle malicious keys for hgetall #1416

Merged
merged 1 commit into from Aug 18, 2021
Merged

fix: handle malicious keys for hgetall #1416

merged 1 commit into from Aug 18, 2021

Conversation

luin
Copy link
Collaborator

@luin luin commented Aug 18, 2021

Closes #1267

@luin luin merged commit 7d73b9d into master Aug 18, 2021
@luin luin deleted the hgetall-malicious branch August 18, 2021 11:24
ioredis-robot pushed a commit that referenced this pull request Aug 18, 2021
## [4.27.8](v4.27.7...v4.27.8) (2021-08-18)

### Bug Fixes

* handle malicious keys for hgetall ([#1416](#1416)) ([7d73b9d](7d73b9d)), closes [#1267](#1267)
@ioredis-robot
Copy link
Collaborator

🎉 This PR is included in version 4.27.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

@@ -427,7 +427,20 @@ Command.setReplyTransformer("hgetall", function (result) {
if (Array.isArray(result)) {
const obj = {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could probably just use Object.create(null) here to avoid the performance hit from the additional check below.

janus-dev87 added a commit to janus-dev87/ioredis-work that referenced this pull request Mar 1, 2024
## [4.27.8](redis/ioredis@v4.27.7...v4.27.8) (2021-08-18)

### Bug Fixes

* handle malicious keys for hgetall ([#1416](redis/ioredis#1416)) ([7d73b9d](redis/ioredis@7d73b9d)), closes [#1267](redis/ioredis#1267)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hgetall mishandles malicious keys (__proto__)
3 participants