abrt / faf

Platform for collection and analysis of packages and package crashes
GNU General Public License v3.0
46 stars 47 forks source link

uReport fails with a package version mismatching the expected regex #1025

Closed genodeftest closed 1 year ago

genodeftest commented 1 year ago

When trying to report a bug on my current Fedora 37 installation, I see the following message (in GNOME Abrt):

--- Running report_uReport ---
Server responded with an error: 'List element is invalid: Element 'version' is invalid: String '20201206^1.git0c78c8329' does not match the pattern  '^[a-zA-Z0-9_\.\+~]+$''
('report_uReport' exited with 1)

It seems like the cause for this are the following binary packages:

$ rpm -qa | grep 20201206
google-noto-fonts-common-20201206^1.git0c78c8329-7.fc37.noarch
google-noto-naskh-arabic-vf-fonts-20201206^1.git0c78c8329-7.fc37.noarch
google-noto-sans-gurmukhi-vf-fonts-20201206^1.git0c78c8329-7.fc37.noarch
google-noto-sans-math-fonts-20201206^1.git0c78c8329-7.fc37.noarch
google-noto-sans-mono-vf-fonts-20201206^1.git0c78c8329-7.fc37.noarch
google-noto-sans-vf-fonts-20201206^1.git0c78c8329-7.fc37.noarch
google-noto-serif-vf-fonts-20201206^1.git0c78c8329-7.fc37.noarch

which are built from the source package google-noto-fonts.

This should not happen. Either Fedora must not allow these strings as package versions (but it does, in reality) or libreport must accept this version string.

Version info:

$ rpm -q libreport abrt
libreport-2.17.4-1.fc37.x86_64
abrt-2.15.1-6.fc37.x86_64

This issue is seen by other users too, e.g. @mcatanzaro in this pagure ticket comment.

PS: I am not sure whether this is the correct place to report this issue. Please give me hints if you think this location is incorrect.

msrb commented 1 year ago

Thanks for the bug report. I think this is a bug in faf as ^ characters are allowed in Fedora. Although they don't seem to be very common.

@mgrabovsky Do you know if simply adding the caret character to the regex here would be enough to fix this issue?

mgrabovsky commented 1 year ago

@msrb From a quick glimpse, I'd say yes, that should fix the problem here.

mgrabovsky commented 1 year ago

The fix has now been deployed to retrace.fedoraproject.org.

genodeftest commented 1 year ago

Thank you very much for this quick fix! I've already tested it and can confirm that it is working fine now (the exact same crash I wanted to report 3 days ago now can be reported just fine).