aboutcode-org / aboutcode-org/univers

Incorrect `Ranges overlap` and `identical boundaries` error while parsing maven version range

未关闭
#142 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
2-next bug good first issue
主要语言
Python
星标
50
派生
29
PR 合并指标
30 天内没有已合并 PR

描述

```python
>>> from univers.version_range import MavenVersionRange
>>> MavenVersionRange.from_native("[3.0.0,3.1.1),(,2.3.4)")
Traceback (most recent call last):
File "", line 1, in
File "../univers/version_range.py", line 784, in from_native
restrictions = maven.VersionRange(string).restrictions
File "../univers/maven.py", line 226, in __init__
raise VersionRangeParseError("Ranges overlap: %s" % spec)
univers.maven.VersionRangeParseError: Ranges overlap: [3.0.0,3.1.1),(,2.3.4)
```

```python
>>> from univers.version_range import MavenVersionRange
>>> MavenVersionRange.from_native("[5.0,5.0]")
Traceback (most recent call last):
File "", line 1, in
File "../univers/version_range.py", line 784, in from_native
restrictions = maven.VersionRange(string).restrictions
File "../univers/maven.py", line 219, in __init__
restriction = Restriction(_spec[0 : close + 1])
File "../univers/maven.py", line 81, in __init__
raise RestrictionParseError("Range cannot have identical boundaries: %s" % spec)
univers.maven.RestrictionParseError: Range cannot have identical boundaries: [5.0,5.0]
```

- Also see https://github.com/aboutcode-org/vulnerablecode/issues/1578

贡献指南

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

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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