Rank 2: Process
Hello everyone! 👋🏻 I'm testing the security and stability of my Appwrite setup. Running the following code on the client side, which is connecting to a self hosted instance of Appwrite, causes problems:
while(true) { appWriteClientController.function!.createExecution( functionId: 'somecrazyfunction', xasync: false); }
It floods the server with function executions. Executing the above code causes my server to hang completely. The Appwrite web interface isn't even loading anymore. 💀 So the code above is basically a denial-of-service attack. ☹️
The problem is that everyone can run this code and bring down my server if they extract the right information from my app (endpoint, project ID). I don't even want to think about what happens when someone runs this code concurrently, I'm afraid it might crash the whole OS.
I haven't tested this on Appwrite Cloud because I definitely don't want to perform a denial-of-service attack on a server that is not my own. 😬 But wat would actually happen if someone runs this code in combination with Appwrite Cloud? Is Appwrite Cloud resistant to this attack?
Does anyone know how to prevent denial-of-service attacks like the one shown above? 😊