99designs / 99designs/http-signatures-php

Use hash_equals instead of double HMAC approach for signature comparison

未关闭
#29 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
PHP
星标
46
派生
35
PR 合并指标
30 天内没有已合并 PR

描述

See https://github.com/99designs/http-signatures-php/pull/28 for what prompted this.

We're currently using a double HMAC approach for signature comparison, as that was the only way for us to securely compare HMAC signatures without making it a breaking change, as the [hash_equals](https://secure.php.net/hash_equals) function we need isn't available until PHP 5.7, and we support PHP 5.5+

When we roll out our next major version we should increase the minimum PHP version to 5.7 or higher, and swap to using `hash_equals`.

贡献指南

这个仓库没有索引到贡献指南

调研方向

Look for signature comparison code in the codebase, likely in a class handling HMAC verification. Replace the double HMAC comparison with hash_equals. Check the PHP version requirement in composer.json to ensure it's 5.7+. Run existing tests to verify the change doesn't break functionality.

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

评估

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

把新 issue 发到你的邮箱

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