Question

I'm still pretty new to this stuff, but when I learned about sending data from my server app, I was told it's "Good house keeping" to flush my cache to the client to clear things that shouldn't be there with something like output.flush();

My question is: if there is something private that my client shouldn't get (like some other user's private data), doesn't this cause any security issues, since this way I'm showing one client data he shouldn't see?

if so, is there another way to do it securely?

Thanks!

Était-ce utile?

La solution

Most streams (input/outpt) are buffered. So what this advice says is that if you are done with the communication you should flush and propably close the stream so all buffered data is sending finally to the end point.

If no (severe security) bug is involved the flush or close method only sends the data to the before established connection (socket). The socket is unique between end points. No other endpoint will get the data.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top