ITADN

fix: invalid role arn crashes with attributeerror instead of returning invalidparameterexception

#9920Openhuyhoang171106 创建于 2026-03-28
H
huyhoang171106commented
## Description When `arn` does not match the expected IAM role pattern, `match` is `None`, but the code immediately calls `match.group("partition")`. This raises `AttributeError` and returns a 500-style failure path instead of the intended `InvalidParameterException`. Concrete impact: malformed user input can crash request handling rather than producing a controlled validation error. **Severity**: `high` **File**: `moto/eks/utils.py` ## Expected Behavior The code should handle this case properly to avoid unexpected errors or degraded quality.
0 条评论