simplesamlphp / simplesamlphp/simplesamlphp-module-consentadmin
It breaks when regex type in `consent.disable` exists
未關閉
還沒有人認領這個 Issue。
- 主要語言
- PHP
- 星號
- 4
- 分支
- 1
- PR 合併指標
- 30 天內沒有已合併 PR
描述
When you have ['type' => 'regex', 'pattern' => '/.*\.mycompany\.com.*/i'], in consent.disable variable in config breaks the module.
The relevant line: https://github.com/simplesamlphp/simplesamlphp-module-consentadmin/blob/799cc2096c379a29fc90d1cd711e29718955a224/src/Controller/ConsentAdmin.php#L206
There is no type check for $disable variable.
// Remove services, whitch have consent disabled
if (isset($idp_metadata['consent.disable'])) {
foreach ($idp_metadata['consent.disable'] as $disable) {
if (array_key_exists($disable, $all_sp_metadata)) {
unset($all_sp_metadata[$disable]);
}
}
}
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 src/Controller/ConsentAdmin.php 中連結的行開始,檢查每個 consent.disable 項目包含所示 regex 設定時是如何處理的。使用該設定重現故障,然後驗證模組不再出錯,且預期的服務篩選仍然正常運作。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- php
- 領域
- backend
- Issue 類型
- 缺陷
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100