CC: Tweaked for Fabric (Discontinued)

CC: Tweaked for Fabric (Discontinued)

394k Downloads

load http whitelist and blacklist from config file

MightyHelper opened this issue ยท 0 comments

commented

Useful information to include:

  • Minecraft version: 1.16.2
  • CC: Tweaked version: 1.91.2
  • Detailed reproduction steps:
  1. open a new world
  2. place a computer
  3. run lua
  4. run http.checkURL("http://localhost")
    • Result: "Domain not permitted"
  5. go to <intall_root>/config/computercraft.json5
  6. remove all elements from the blacklist
  7. add localhost to whitelist
  8. restart Minecraft
  9. re-do steps 3 and 4
  10. Result unchanged (5)

Probable cause :

I've spent a few minutes looking at the code and what I believe to be the issue is that this
https://github.com/Zundrel/cc-tweaked-fabric/blob/4d00969ef0a6907e122789995ae36fa10070ccb3/src/main/java/dan200/computercraft/shared/util/Config.java#L162-L165
Enables the updating of the whitelist and blacklist, however (I think) the URLs are checked against the httpRules
https://github.com/Zundrel/cc-tweaked-fabric/blob/4d00969ef0a6907e122789995ae36fa10070ccb3/src/main/java/dan200/computercraft/ComputerCraft.java#L89-L95
which are not re-created when the blacklist and whitelist arrays are updated.

I'm happy to help if you need more information.