Site and Page Checklists Consistency? What’s that?!

Slides:



Advertisements
Similar presentations
PHP Form and File Handling
Advertisements

LIS651 lecture 3 taming PHP Thomas Krichel
LIS651 lecture 3 functions & sessions Thomas Krichel
CookiesPHPMay-2007 : [‹#›] Maintaining State in PHP Part I - Cookies.
Lecture 6/2/12. Forms and PHP The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input When dealing with HTML forms.
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
©2009 Justin C. Klein Keane PHP Code Auditing Session 7 Sessions and Cookies Justin C. Klein Keane
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
Using Session Control in PHP tMyn1 Using Session Control in PHP HTTP is a stateless protocol, which means that the protocol has no built-in way of maintaining.
 Proxy Servers are software that act as intermediaries between client and servers on the Internet.  They help users on private networks get information.
The Internet & The World Wide Web Notes
Cookies COEN 351 E-commerce Security. Client / Session Identification HTTP does not maintain state. State Information can be passed using: HTTP Headers.
APACHE SERVER By Innovationframes.com »
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Linux Operations and Administration
Review of Last Session Search Engine Optimisation (SEO) Search Engine Optimisation (SEO) You can fine-tune your site so that the search engines notice.
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting Cookies & Sessions.
Cookies Set a cookie – setcookie() Extract data from a cookie - $_COOKIE Augment user authentication script with a cookie.
CHAPTER 12 COOKIES AND SESSIONS. INTRO HTTP is a stateless technology Each page rendered by a browser is unrelated to other pages – even if they are from.
CSC 2720 Building Web Applications Cookies, URL-Rewriting, Hidden Fields and Session Management.
Chapter 33 CGI Technology for Dynamic Web Documents There are two alternative forms of retrieving web documents. Instead of retrieving static HTML documents,
Lecture 14 – Web Security SFDV3011 – Advanced Web Development 1.
Let’s Make An Form! Bonney Armstrong GD 444 Westwood College February 9, 2005.
© All rights reserved. Zend Technologies, Inc. PHP Security Kevin Schroeder Zend Technologies.
CSE 154 LECTURE 12: COOKIES. Including files: include include("filename"); PHP include("header.html"); include("shared-code.php"); PHP inserts the entire.
Web Programming Language Week 7 Dr. Ken Cosh Security, Sessions & Cookies.
Week seven CIT 354 Internet II. 2 Objectives Database_Driven User Authentication Using Cookies Session Basics Summary Homework and Project 2.
Lecture 8 – Cookies & Sessions SFDV3011 – Advanced Web Development 1.
Forms and Server Side Includes. What are Forms? Forms are used to get user input We’ve all used them before. For example, ever had to sign up for courses.
1 Chapter 9 – Cookies, Sessions, FTP, and More spring into PHP 5 by Steven Holzner Slides were developed by Jack Davis College of Information Science.
Cookies & Session Web Technology
Prof Frankl, Spring 2008CS Polytechnic University 1 Overview of Web database applications with PHP.
PHP Workshop ‹#› Maintaining State in PHP Part II - Sessions.
CSC 2720 Building Web Applications Server-side Scripting with PHP.
SessionsPHPApril 2010 : [‹#›] Maintaining State in PHP Part II - Sessions.
Topics Sending an Multipart message Storing images Getting confirmation Session tracking using PHP Graphics Input Validators Cookies.
Sessions in PHP – Page 1 of 13CSCI 2910 – Client/Server-Side Programming CSCI 2910 Client/Server-Side Programming Topic: Sessions in PHP Reading: Williams.
Web Database Programming Week 7 Session Management & Authentication.
Cookies and Sessions IDIA 618 Fall 2014 Bridget M. Blodgett.
Web Development 101 Presented by John Valance
The Problem of State. We will look at… Sometimes web development is just plain weird! Internet / World Wide Web Aspects of their operation The role of.
Sessions and Cookies State Management, Cookies, Sessions, Hidden Fields SoftUni Team Technical Trainers Software University
ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.
הרצאה 4. עיבוד של דף אינטרנט דינמי מתוך Murach’s PHP and MySQL by Joel Murach and Ray Harris.  דף אינטרנט דינמי משתנה עפ " י הרצת קוד על השרת, יכול להשתנות.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
SESSIONS 27/2/12 Lecture 8. ? Operator Similar to the if statement but returns a value derived from one of two expressions by a colon. Syntax: (expression)
PHP and Sessions. Session – a general definition The GENERAL definition of a session in the “COMPUTER WORLD” is: The interactions (requests and responses)
 A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests.
ITM © Port,Kazman 1 ITM 352 Cookies. ITM © Port,Kazman 2 Problem… r How do you identify a particular user when they visit your site (or any.
1 PHP HTTP After this lecture, you should be able to know: How to create and process web forms with HTML and PHP. How to create and process web forms with.
PHP Syntax You cannot view the PHP source code by selecting "View source" in the browser - you will only see the output from the PHP file, which is plain.
COEN 350: Network Security E-Commerce Issues. Table of Content HTTP Authentication Cookies.
Cookies and Sessions in PHP. Arguments for the setcookie() Function There are several arguments you can use i.e. setcookie(‘name’, ‘value’, expiration,
Unit-6 Handling Sessions and Cookies. Concept of Session Session values are store in server side not in user’s machine. A session is available as long.
Sessions and cookies (part 2) MIS 3501, Fall 2015 Brad N Greenwood, PhD Department of MIS Fox School of Business Temple University 11/19/2015.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
COOKIES AND SESSIONS.
PHP: Further Skills 02 By Trevor Adams. Topics covered Persistence What is it? Why do we need it? Basic Persistence Hidden form fields Query strings Cookies.
Technical SEO tips for Web Developers Richa Bhatia Singsys Pte. Ltd.
19.10 Using Cookies A cookie is a piece of information that’s stored by a server in a text file on a client’s computer to maintain information about.
Maintaining State in PHP Part II - Sessions
Cookies and Sessions in PHP
Intro to PHP & Variables
Web Systems Development (CSC-215)
Web Systems Development (CSC-215)
Configuring Internet-related services
Maintaining State in PHP Part II - Sessions
Cookies and sessions Saturday, February 23, 2019Saturday, February 23,
Presentation transcript:

Site and Page Checklists Consistency? What’s that?!

For Sites KU Template –Use current KU template (where feasible) –Turn off or remove kuoldcompatible variable –The new KU template includes jQuery by default. Verify that the site is not including a second local copy. Note: Also remember that the new KU specific installation of jQuery uses the syntax $kuj() instead of jQuery's normal $() for selectors. See: "Using jQuery within the KU Template" for more information."Using jQuery within the KU Template"

For Sites Google Analytics –Enable Google Analytics for the site: –If applicable, specify your site-specific Google analytics code: Verify the site title, keywords, and descriptions

For Sites CSS –IE stylesheets using link tags, See slide #10 from our April 2nd, 2009 presentation.See slide #10 from our April 2nd, 2009 presentation. –Include common2009.css See the differences between common.css and common2009.css before you do this. Some of the CSS classes have changed! (differences coming soon). –If your site includes forms, to include the forms2009.css file and forms2009_ie6.css / forms2009_ie7.css files. (The _ie# files should be included using the link method mentioned above. See the differences between forms.css and forms2009.css. (Coming soon)

For Pages Verify that all appropriate SSI variables are set –Page Title –Page Keywords –Page Description –Breadcrumbs –etc…

For Pages Check the site for valid HTML Verify that no inline CSS is being used Verify that no inline JS is being used Use semantic markup Use microformats where applicable.microformats Verify that the page is using the 2009 version of the footer.

Google Analytics Acquiring a Google account, requesting a departmental code, and adding to your site pages

Google Accounts Determining the Google account –Departmental account Sign up – –Confirmation: Example Subject: Google Verification Welcome to Google Accounts. To activate your account and verify your address, please click the following link: M2F5JqXkwEQ7YuMtujc6p4W&hl=en

Departmental Codes Contact: Web Services Google Analytics KU Departmental Code: example: UA

Adding Google Analytics to Your Site KU Template Configuration Variables The newest version of the KU Template must be implemented on the site Example: ~ myssi\myheader.shtml – Accessing Google Analytics –

PHP Session Management What they are, why you should use them, and how to do so securely

What are Sessions? Sessions are like server-side cookies The data live in text files on the server Allows you to store more data than you’ll likely ever need The server links the user to their session data using a session ID in the URL (bad!) or in a cookie Data is accessible via $_SESSION superglobal array –$x = $_SESSION['x']; $_SESSION['y'] = $y;

Why use them? FAR more secure than cookies because the data doesn’t live on the client machine Can store much more than a simple cookie Easier to test with since you can see the session data files on the server

How to use them session_start(); //that’s it, you’re done We can do better than that though. Caveat: –This command sends a cookie. Cookies are sent via HTTP headers. Therefore… –You need to use this command BEFORE any page content is sent to the browser This is the most common mistake people make when beginning to use sessions. If you need to, use output buffering.

How to use them securely All must be done before calling session_start() Don’t send the session ID as part of the URL –This makes session hijacking MUCH harder –This is the most important setting you can change –ini_set('session.use_only_cookies', '1'); Use SHA-1 instead of md5 for session IDs –md5 has been cracked multiple times –SHA-1 results in longer session IDs (more secure) –This is not encrypting the session, just generating IDs –ini_set('session.hash_function', '1');

How to use them securely (cont.) Session cookie settings are changed by session_set_cookie_params(), which runs 5 separate ini_set calls. Think setcookie() –Expiration time –Path –Domain –Secure (only send the cookie over HTTPS) –HTTP only If true, the session cookie is not accessible via JavaScript. Big gains against XSS but not supported by all browsers.

How to use them securely (cont.) Here’s what we use: –session_set_cookie_params('7200', '', '', true, true); //2 hours, default path, default domain, https only, no JS access –2 hours is arbitrary, but that’s how long a Shibboleth session lasts Set a session name (avoids confusion and/or collisions). Don’t forget this value. –session_name('name goes here');

How to use them securely (cont.) Set a more secure save path –session_save_path('path/goes/here'); –Default path is Apache’s /tmp directory, which is globally readable Others on the server can snoop through your session files…they are plain text Create a directory for sessions in your web account, above public_html (like /home/account/tmp or /home/account/sessions) and use that instead Remember to call these before session_start()

How to end a session We blatantly stole this from the PHP manual and we recommend you do the same. $_SESSION = array(); if (isset($_COOKIE[session_name()])) { setcookie(session_name(), '', time() , '/'); } session_destroy();

We’ve done the work for you All of this code has been rolled up into a static class you can use. Example (pretend this is the last page): require_once '/home/ssts_lib/lib/SPEAR/SessionLocal.php'; SessionLocal::start('session name', 'save/path'); ob_start(); //don’t send any page content yet page page page… SessionLocal::kill(); //kill the current session ob_end_flush(); //send the page content

Other best practices for sessions Whenever authentication changes (sign in, sign out, get more/less rights, etc…) make a new session ID –session_regenerate_id(); //keeps the data but changes the ID Don’t use a session to store authentication information (like $_SESSION['allowed']=1;) If feasible, restrict sessions to a single IP –Might not work for users behind a proxy