aboutcode-org / aboutcode-org/univers

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

オープン
#142 コメント 1 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。