← Back to issue list

storeapi: ensure snap ID is sane before using it

View original Github issue

Metadata

Project
snapcraft
Number
#2115
Type
pull request
State
merged
Author
kyrofa
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #2115 in commit 12828eba2 validates snap IDs before use, preventing tracebacks when the Store registers a snap without an ID and fixing LP #1763721.

Resolution: closed resolved

Reason: The pull request was merged as commit 12828eba2. It adds validation before using a snap ID, resolving the traceback caused by Store responses containing no ID.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh unit`? ----- The store had a bug that ended up causing a snap to be registered to a user, but have no ID. The snapcraft CLI didn't handle this well, producing a traceback. This PR fixes [LP: #1763721](https://bugs.launchpad.net/snapcraft/+bug/1763721) by checking the snap ID before using it.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #2115 in commit 12828eba2 validates snap IDs before use, preventing tracebacks when the Store registers a snap without an ID and fixing LP #1763721.
stealth/space-bunny-alpha — closed resolved Merged PR #2115 in commit 12828eba2, validating Store API snap IDs to prevent tracebacks when a registered snap has no ID; fixes LP #1763721.
stealth/space-bunny-alpha — closed resolved Merged PR #2115 as commit 12828eba2, validating snap IDs before use to prevent a traceback when the Store registers a snap without an ID (LP #1763721).
stealth/space-bunny-alpha — closed resolved Merged in PR #2115 as commit 12828eba2, validating snap IDs before use to prevent tracebacks when the store returns no ID; fixes LP #1763721.
stealth/space-bunny-alpha — closed resolved Merged PR #2115 (commit 12828eba2) validates snap IDs before use, preventing tracebacks when the store registers a snap without an ID; fixes LP #1763721.
qwen/qwen3.6-35b-a3b — — Merged a fix for LP: #1763721 that prevents snapcraft CLI tracebacks by validating snap IDs before use, resolving a store bug where snaps were registered without IDs.
qwen3.6-35b-a3b-mtp-q6 — — Merged to address LP: #1763721. Added a sanity check in storeapi to validate snap IDs before use, preventing CLI tracebacks caused by the store registering snaps without an ID.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3349 cli: allow snap-id for validate snapcraft merged Merged PR #3349 (commit 1fc64e4ac, LP #1902913) lets `snapcraft validate` accept a snap-id as fallback when the Info API can't resolve a name, e.g. for private snaps; shipped on edge/pr-3349.
71%