2019-09-01 10:03:44 |
Merlijn Sebrechts |
bug |
|
|
added bug |
2019-09-01 10:40:42 |
Merlijn Sebrechts |
description |
If you run `snap remove` with bad arguments, it currently assumes all arguments are snap names, regardless of whether these names are valid or not. As a result, slightly mistyping a `snap remove` command has very bad consequences.
Assume you just refreshed a snap to the latest version and you want to remove a previous version of this snap. This is what happens when you forget the two hyphens before `revision`.
```bash
merlijn@howard:~$ snap remove sdlpop revision=131
sdlpop removed
revision=131 not installed
```
Snap removes `sdlpop` entirely and tries to remove the snap `revision=131`. This causes irreversible damage since all user data and previous versions of sdlpop are removed. This has already happened: https://forum.snapcraft.io/t/accidentally-removed-snap-package-how-to-revert-to-older-revision/12982?u=galgalesh
In order to prevent users from accidentally shooting themselves in the foot, `snap remove` should check if all arguments are valid snap names. If they are not, `snap remove` should error out. |
If you run `snap remove` with bad arguments, it currently assumes all arguments are snap names, regardless of whether these names are valid or not. As a result, slightly mistyping a `snap remove` command has very bad consequences.
Assume you refresh a snap to the latest version to see that it is broken. You revert to a previous version and you want to remove the latest version. This is what happens when you forget the two hyphens before `revision`.
```bash
merlijn@howard:~$ snap remove sdlpop revision=131
sdlpop removed
revision=131 not installed
```
Snap removes `sdlpop` entirely and tries to remove the snap `revision=131`. This causes irreversible damage since you can only revert to versions you have cached locally, so you lose the ability to use the previous working revision. This has already happened: https://forum.snapcraft.io/t/accidentally-removed-snap-package-how-to-revert-to-older-revision/12982?u=galgalesh
In order to prevent users from accidentally shooting themselves in the foot, `snap remove` should check if all arguments are valid snap names. If they are not, `snap remove` should error out. |
|
2019-09-01 10:41:12 |
Merlijn Sebrechts |
description |
If you run `snap remove` with bad arguments, it currently assumes all arguments are snap names, regardless of whether these names are valid or not. As a result, slightly mistyping a `snap remove` command has very bad consequences.
Assume you refresh a snap to the latest version to see that it is broken. You revert to a previous version and you want to remove the latest version. This is what happens when you forget the two hyphens before `revision`.
```bash
merlijn@howard:~$ snap remove sdlpop revision=131
sdlpop removed
revision=131 not installed
```
Snap removes `sdlpop` entirely and tries to remove the snap `revision=131`. This causes irreversible damage since you can only revert to versions you have cached locally, so you lose the ability to use the previous working revision. This has already happened: https://forum.snapcraft.io/t/accidentally-removed-snap-package-how-to-revert-to-older-revision/12982?u=galgalesh
In order to prevent users from accidentally shooting themselves in the foot, `snap remove` should check if all arguments are valid snap names. If they are not, `snap remove` should error out. |
If you run `snap remove` with bad arguments, it currently assumes all arguments are snap names, regardless of whether these names are valid or not. As a result, slightly mistyping a `snap remove` command has very bad consequences.
Assume you refresh a snap to the latest version to see that it is broken. You revert to a previous revision and you want to remove the latest revision. This is what happens when you forget the two hyphens before `revision`.
```bash
merlijn@howard:~$ snap remove sdlpop revision=131
sdlpop removed
revision=131 not installed
```
Snap removes `sdlpop` entirely and tries to remove the snap `revision=131`. This causes irreversible damage since you can only revert to versions you have cached locally, so you lose the ability to use the previous working revision. This has already happened: https://forum.snapcraft.io/t/accidentally-removed-snap-package-how-to-revert-to-older-revision/12982?u=galgalesh
In order to prevent users from accidentally shooting themselves in the foot, `snap remove` should check if all arguments are valid snap names. If they are not, `snap remove` should error out. |
|
2019-09-03 07:52:45 |
Paweł Stołowski |
snapd: status |
New |
Confirmed |
|
2019-09-03 07:52:57 |
Paweł Stołowski |
snapd: importance |
Undecided |
High |
|
2020-01-06 13:17:11 |
Samuele Pedroni |
snapd: assignee |
|
Samuele Pedroni (pedronis) |
|
2021-08-19 18:16:49 |
Miguel Pires |
snapd: status |
Confirmed |
In Progress |
|
2021-08-19 18:16:49 |
Miguel Pires |
snapd: assignee |
Samuele Pedroni (pedronis) |
Miguel Pires (miguelpires1) |
|
2021-08-25 16:59:21 |
Miguel Pires |
snapd: status |
In Progress |
Fix Committed |
|
2022-11-11 12:03:32 |
Miguel Pires |
snapd: status |
Fix Committed |
Fix Released |
|