CobbleSword / NachoSpigot

NachoSpigot is a fork of TacoSpigot 1.8.9 that offers several enhancements to performance as well as bug fixes.
GNU General Public License v3.0
237 stars 87 forks source link

1337 nbt hax #318

Closed Memexurer closed 2 years ago

Memexurer commented 2 years ago

fixes windowclick book exploits idk if it will break anything, i tested it and it worked somehow

ghost commented 2 years ago

You said it yourself 'idk if it will break anything', before opening these types of PR you should do testing

HeathLoganCampbell commented 2 years ago

Could you explain how adding a hash helps?

Memexurer commented 2 years ago

because reading whole Item can crash the server if someone sents an item with nbt exploits

HeathLoganCampbell commented 2 years ago

because reading whole Item can crash the server if someone sents an item with nbt exploits

Doesn't the hash have to read the item too tho? also what's the benchmarks of this change?

Memexurer commented 2 years ago
Benchmark                         Mode  Cnt       Score   Error   Units
NormalItemBenczor.compareHash    thrpt    2   10618,709          ops/ms
NormalItemBenczor.compareNormal  thrpt    2  580908,900          ops/ms
NormalItemBenczor.compareHash       ss    2       1,083           ms/op
NormalItemBenczor.compareNormal     ss    2       0,022           ms/op

nvm guys its too bad

HeathLoganCampbell commented 2 years ago

Nice job @Memexurer, putting ego aside and looking at the numbers

Memexurer commented 2 years ago

btw i broke the benchmarks somehow, its 0,2ms/op but its still bad

Memexurer commented 2 years ago

but at least it fixes nbt exploits 😭😭😭