SecureSECO / searchSECO-miner

v2 js miner implementation for SearchSECO
https://docs.secureseco.org/searchseco-integration
MIT License
3 stars 3 forks source link

Create Modern Secured DB API #6

Open slingerbv opened 1 year ago

slingerbv commented 1 year ago

So that we need some kind of authentication to go into the DB and so that we don't have to use tcp/ip anymore.

Also, to need less code.

Eventually, make sure we also close the tcp/ip way of communicating with the DB, so we don't leave a huge backdoor.

slingerbv commented 1 year ago

And ensure we don't get "| database-API | Client.js 60 | [ ERR ] Request body larger than expected." anymore :-(

xray27 commented 1 year ago

The 'Request body larger than expected' is because of special characters in the request body that take up more than one byte (such as chinese characters). I treat them as one byte, but the TCP server reads these characters as more than one byte per character, so it responds with a 'Request body larger than expected' error.

slingerbv commented 1 year ago

So, (how) do we fix?

xray27 commented 1 year ago

In the request generation we need to encode the characters differently. Now I just count the length of the string as the size of the request, but that needs to change

xray27 commented 1 year ago

Request body too large is now fixed and merged into main