aws / aws/aws-dynamodb-encryption-java

NPE if reading record without a amzn-ddb-map-desc

未关闭
#123 6 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Java
星标
141
派生
74
PR 合并指标
30 天内没有已合并 PR

描述

This line throws a null pointer exception if you attempt to decrypt a record where the amzn-ddb-map-desc attribute has been manually removed: https://github.com/aws/aws-dynamodb-encryption-java/blob/master/sdk1/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/encryption/providers/DirectKmsMaterialProvider.java#L126

We should check this earlier and throw a more useful exception.

贡献指南

打开贡献指南

调研方向

从 sdk1/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/encryption/providers/DirectKmsMaterialProvider.java 的第 126 行开始,在手动移除 amzn-ddb-map-desc 后复现解密过程。跟踪缺失属性首次被使用的位置。完成标准是缺失属性产生有用的 exception,而不是 NullPointerException。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
security
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
描述清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。