Image

CHAPTER8

Safe File Upload and File I/O

File input and output (I/O) refers to the process of reading, writing, or otherwise managing files during operation of your web application. All file I/O requires special security handling precautions for safe use. In this chapter, we describe various techniques you can apply to your own applications to reduce the risk of exploitation.

Anti-Patterns and Design Flaws

Handling files in your application can open you up to a number of vulnerabilities that are not encountered when displaying data from other sources. Following are several design flaws that should be avoided in order to securely handle files.

Get Iron-Clad Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.