Code Monkey home page Code Monkey logo

cfbackport's Introduction

            __ _____ ____   ____    __ __  _ ____   ___  ____  ______
           /  ]     |    \ /    |  /  ]  |/ ]    \ /   \|    \|      |
          /  /|   __|  o  )  o  | /  /|  ' /|  o  )     |  D  )      |
         /  / |  |_ |     |     |/  / |    \|   _/|  O  |    /|_|  |_|
        /   \_|   _]|  O  |  _  /   \_|     \  |  |     |    \  |  |
        \     |  |  |     |  |  \     |  .  |  |  |     |  .  \ |  |
         \____|__|  |_____|__|__|\____|__|\_|__|   \___/|__|\_| |__|

Author: David "Mister Dai" Boyer
Website: http://misterdai.wordpress.com
Version: 0.7
Contributors: Henry Ho, David Epler

----------------------
| Description        |
----------------------

This project aims to make at least some functions from newer versions of Adobe
ColdFusion avilable in older versions.  For example, SessionInvalidate() is new
to CF10 but undocumented features make it possible in at least CF8+, possibly
even CF7.

Each set of functions is wrapped within an "if" statement to make sure they
aren't loaded if the version already supports them.

----------------------
| Requirements       |
----------------------

Functions should work in at least ColdFusion 8+.  Where possible I've tried to
avoid using newer syntax or functions

If ColdFusion is patched with APSB11-04 or higher, ESAPI is available for 
Encode and Decode functions.
 
APSB11-04+ installs ESAPI 1.4.4 for CF8.0.x and ESAPI 2.0_rc10 for CF9.0.0/1
CF9.0.2 already has ESAPI 2.0_rc10 installed

----------------------
| Usage              |
----------------------

Include the file cfbackport.cfm where you'd like the functions to appear.  Keep
in mind that if you are operating within a CFC, you'll need to include them
there to make use of them.

<cfinclude template="cfbackport.cfm" />

----------------------
| Functions          |
----------------------

	* Backported from CF10 for CF9 and CF8

		ArraySlice
		CallStackDump
		CallStackGet
		Canonicalize
		CsrfGenerateToken
		CsrfVerifyToken
		DecodeForHTML			(David Epler) [requires ESAPI 2.0+]
		DecodeFromURL			(David Epler)
		EncodeForCSS			(Henry Ho)
		EncodeForHTML
		EncodeForHTMLAttribute	(Henry Ho)
		EncodeForJavaScript		(Henry Ho)
		EncodeForURL			(Henry Ho)
		EncodeForXML			(David Epler)
		GetApplicationMetadata
		HMac				(David Epler)
		IsClosure
		ReEscape
		SessionInvalidate
		SessionStartTime
		
	* Backported from CF9 for CF8
		throw				(David Epler) [required for DecodeFromURL]

----------------------
| Unit Tests         |
----------------------

Unit tests were created with MXUnit 2.1.1

	* As written (of course) CF10 passes them all
	* CF9.0.x with APSB11-04+ - 13 success, 0 error, 1 failure
	 * Failure is due to ESAPI version difference
	* CF8.0.x with APSB11-04+ - 9 success, 1 error, 4 failure
	 * Failure and Error is due to ESAPI version difference
		

cfbackport's People

Contributors

dcepler avatar henrylearn2rock avatar jamiejackson avatar misterdai avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.