cryptic-game / frontend

The official frontend of Cryptic
https://play.cryptic-game.net
GNU Affero General Public License v3.0
11 stars 15 forks source link

rm can't delete a file that contains another persons wallet. #294

Open McModknower opened 2 years ago

McModknower commented 2 years ago

Describe the bug

If a file contains another persons wallet, the command rm on the command line can't delete the file. You get the promt, but when you answer with yes, the error message in the screenshot comes up. Using the file manager however works.

Reproduce

  1. Get another wallet id and wallet key
  2. create a file containing the wallet id, folled by a space, followed by the wallet key
  3. open the location in a terminal
  4. try to use rm to remove the file
  5. answer 'yes' to the promt

Logs bug-delete-other-wallet I don't have logs since i got this on play.cryptic-game.net

Additional Comments

You can use the file manager to directly remove the file or the file editor to modify the contents to no longer contain a valid wallet and then remove it.

ClientCrash commented 2 years ago

To my knowledge wallets can only be deleted by their owner. I think this is intentional. @DevMimas Please look into the problem and report back if players should be able to delete a wallet. @cryptic-game/gamedesign

McModknower commented 2 years ago

@ClientCrash It is not about deleting another players wallet, it is about deleting a file (on my machine) that contains the wallet of someone else. My reasoning is that if i am able to use touch WALLET-ID WALLET-KEY to create a file that contains an already existing wallets information, i should also be able to remove that file.

ClientCrash commented 2 years ago

Yes i know, but isnt the file liked to the wallet?

McModknower commented 2 years ago

It seems that any file that contains valid wallet information is connected to the wallet.

However that means that i can get some wallet information, connect to a hacked device, use touch to create files that contain that wallet information. After that i can't remove the files i just created since they all are now connected to the wallet.

And i don't think you are supposed to be able to create files without being able to delete them. However in that case, the wallet should not get deleted, just the file.