Page 352 - Open Soource Technologies 304.indd
P. 352

Web Technologies-I



                   Notes                                     Unit 14: Security




                                   CONTENTS
                                   Objectives
                                   Introduction
                                   14.1  Global Variables and Form Data

                                       14.1.1  Initialize Variables
                                       14.1.2  Set Variables Order
                                       14.1.3  Data Filtering
                                   14.2  Filenames
                                       14.2.1  Check for Relative Paths
                                       14.2.2  Restrict Filesystem Access to a Specific Directory

                                   14.3  File Uploads
                                       14.3.1  Beware of Filling Your Filesystem
                                       14.3.2  Surviving register_globals
                                       14.3.3  Distrust Browser-Supplied Filenames
                                   14.4  File Permissions
                                       14.4.1  Do not Use Files
                                       14.4.2  Get It Right the First Time
                                       14.4.3  Session Files

                                       14.4.4  Safe Mode
                                   14.5  PHP Code
                                   14.6  Shell Commands
                                   14.7  Summary
                                   14.8  Keywords
                                   14.9  Review Questions
                                   14.10 Further Reading

                                 Objectives


                                 After studying this unit, you will be able to:
                                    •  Discuss about global variables and form data
                                    •  Understand file uploads in PHP

                                    •  Explain about file permissions in PHP
                                    •  Discuss about the PHP code
                                    •  Explain the shell commands in PHP







        346                               LOVELY PROFESSIONAL UNIVERSITY
   347   348   349   350   351   352   353   354   355   356   357