MightyPirates / OpenComputers

Home of the OpenComputers mod for Minecraft.
https://oc.cil.li
Other
1.59k stars 430 forks source link

[1.10] computer.addUser() does not affect hoppers #2289

Closed A-UNDERSCORE-D closed 6 years ago

A-UNDERSCORE-D commented 7 years ago

OC version 1.6.1 in DW20 version 1.6.1

After locking a computer using computer.addUser(), anyone not on the user list can not use a screen or open the case's inventory. However, one can extract all the hardware in the case using a hopper.

Steps to reproduce (Note that it would seem that OPs can override the lock) 1; set up a case with hardware and install OpenOS to it 2; open a lua console and use =computer.addUser("") using a nick other than your own 3; place a hopper under the case

Items are pulled out of the case and into the hopper, ignoring set users

payonel commented 6 years ago

the addUser() is a basic level of security, not intended to act as a block control like other mods provide. It should block direct access only, from user->computer. Further protection of the contents of a case should be done by protecting the case itself. Somewhat like real life. I could stop hopper access if the user list is non-empty, but in my opinion this is a gray area, it's not really the intention of the addUser feature, and oc doesn't want to be in the business of strict block control.