load http whitelist and blacklist from config file
MightyHelper opened this issue ยท 0 comments
Useful information to include:
- Minecraft version: 1.16.2
- CC: Tweaked version: 1.91.2
- Detailed reproduction steps:
- open a new world
- place a computer
- run
lua - run
http.checkURL("http://localhost") -
- Result: "Domain not permitted"
- go to
<intall_root>/config/computercraft.json5 - remove all elements from the blacklist
- add localhost to whitelist
- restart Minecraft
- re-do steps
3and4 - 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.