Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixes

  • Loading branch information...
commit 0b1afc1641a4c7a6281b12fcf103479da92ef209 1 parent 624c9e7
@lmajano lmajano authored
View
3  install/IDE Extras/CFBuilder Dictionary/coldbox.builder.xml
@@ -467,6 +467,9 @@
<parameter name="locale" required="false" type="string">
<help><![CDATA[ The locale to validate in ]]></help>
</parameter>
+ <parameter name="excludeFields" required="false" type="string">
+ <help><![CDATA[ The fields to exclude in the validation ]]></help>
+ </parameter>
</function>
<function name="getResource" returns="any">
<help><![CDATA[ Facade to i18n.getResource. Returns a string. (Context: FrameworkSupertype) ]]></help>
View
3  install/IDE Extras/CFEclipse Dictionary/coldbox.xml
@@ -470,6 +470,9 @@
<parameter name="locale" required="false" type="string">
<help><![CDATA[ The locale to validate in ]]></help>
</parameter>
+ <parameter name="excludeFields" required="false" type="string">
+ <help><![CDATA[ The fields to exclude in the validation ]]></help>
+ </parameter>
</function>
<function creator="8" name="getResource" returns="any">
<help><![CDATA[ Facade to i18n.getResource. Returns a string. (Context: FrameworkSupertype) ]]></help>
View
56 system/plugins/CookieStorage.cfc
@@ -8,7 +8,7 @@ Author : Sana Ullah
Date : October 15, 2007
Description :
This is a plugin that enables the setting/getting of permanent variables in the cookie scope.
- Usage:
+ Usage:
set controller.getPlugin("CookieStorage").setVar(name="name1",value="hello1",expires="11")
get controller.getPlugin("CookieStorage").getVar(name="name1")
Modification History: March 23,2008 Added new feature to encrypt/decrypt cookie value
@@ -24,26 +24,26 @@ Modification History: March 23,2008 Added new feature to encrypt/decrypt cookie
<cffunction name="init" access="public" returntype="CookieStorage" output="false" hint="Constructor">
<cfargument name="controller" type="any" required="true" colddoc:generic="coldbox.system.web.Controller">
- <cfscript>
+ <cfscript>
super.init(arguments.controller);
-
+
// Plugin Properties
setpluginName("Cookie Storage");
setpluginVersion("2.0");
setpluginDescription("A permanent data storage plugin.");
setpluginAuthor("Sana Ullah & Luis Majano");
setpluginAuthorURL("http://www.coldbox.org");
-
+
// set CFML engine encryption CF, BD, Railo
setEncryptionAlgorithm("CFMX_COMPAT");
setEncryptionKey("ColdBoxPlatform");
setEncryption(false);
setEncryptionEncoding("HEX");
-
+
// set defautl alogrithm according to CFML engine
if(controller.getCFMLEngine().getEngine() EQ 'BLUEDRAGON'){
setEncryptionAlgorithm("BD_DEFAULT");
- }
+ }
// Do we Encrypt.
if(settingExists('CookieStorage_encryption') and isBoolean(getSetting('CookieStorage_encryption'))){
setEncryption(getSetting('CookieStorage_encryption'));
@@ -60,7 +60,7 @@ Modification History: March 23,2008 Added new feature to encrypt/decrypt cookie
if(settingExists('CookieStorage_encryption_encoding') and len(getSetting('CookieStorage_encryption_encoding'))){
setEncryptionEncoding(getSetting('CookieStorage_encryption_encoding'));
}
-
+
return this;
</cfscript>
</cffunction>
@@ -77,26 +77,26 @@ Modification History: March 23,2008 Added new feature to encrypt/decrypt cookie
<cfargument name="path" type="string" required="false" default="" hint="URL, within a domain, to which the cookie applies; typically a directory. Only pages in this path can use the cookie. By default, all pages on the server that set the cookie can access the cookie.">
<cfargument name="domain" type="string" required="false" default="" hint="Domain in which cookie is valid and to which cookie content can be sent from the user's system.">
<!--- ************************************************************* --->
-
+
<cfset var tmpVar = "">
<cfset var args = StructNew()>
-
+
<!--- JSON storage --->
<cfset tmpVar = serializeJSON( arguments.value )>
-
+
<!--- Encryption? --->
<cfif getEncryption()>
- <cfset tmpVar = encryptIt( tmpVar )>
+ <cfset tmpVar = encryptIt( tmpVar )>
</cfif>
-
+
<!--- Store cookie with expiration info --->
<cfset args["name"] = uCase( arguments.name ) />
<cfset args["value"] = tmpVar />
<cfset args["secure"] = arguments.secure />
<cfif arguments.expires GT 0>
<cfset args["expires"] = arguments.expires />
- </cfif>
-
+ </cfif>
+
<!--- Store cookie with expiration info --->
<cfif len( arguments.path ) GT 0 and not len( arguments.domain ) GT 0>
<cfthrow type="CookieStorage.MissingDomainArgument" message="If you specify path, you must also specify domain.">
@@ -106,7 +106,7 @@ Modification History: March 23,2008 Added new feature to encrypt/decrypt cookie
<cfelseif len( arguments.domain )>
<cfset args["domain"] = arguments.domain />
</cfif>
-
+
<cfcookie attributeCollection="#args#" />
</cffunction>
@@ -115,25 +115,25 @@ Modification History: March 23,2008 Added new feature to encrypt/decrypt cookie
<cfargument name="name" required="true" hint="The variable name to retrieve.">
<cfargument name="default" required="false" hint="The default value to set. If not used, a blank is returned.">
<cfset var rtnVar = "">
-
+
<cfif exists(arguments.name)>
<!--- Get value --->
<cfset rtnVar = cookie[ uCase( arguments.name ) ]>
-
+
<!--- Decrypt? --->
<cfif getEncryption() and len( rtnVar )>
<cfset rtnVar = decryptIt( rtnVar )>
</cfif>
-
+
<!--- JSON Deserialize? --->
<cfif isJSON( rtnVar )>
<cfset rtnVar = deserializeJSON( rtnVar )>
</cfif>
<!--- Return it --->
- <cfreturn rtnVar>
+ <cfreturn rtnVar>
<cfelseif structKeyExists(arguments, "default")>
<!--- Return the default value --->
- <cfset rtnVar = arguments.default>
+ <cfreturn arguments.default>
<cfelse>
<cfthrow type="CookieStorage.InvalidKey" message="The key you requested: #arguments.name# does not exist">
</cfif>
@@ -165,7 +165,7 @@ Modification History: March 23,2008 Added new feature to encrypt/decrypt cookie
<cfreturn false>
</cfif>
</cffunction>
-
+
<!--- Get/Set Encryption Key --->
<cffunction name="getEncryptionKey" access="public" output="false" returntype="string" hint="Get the EncryptionKey">
<cfreturn instance.EncryptionKey/>
@@ -183,7 +183,7 @@ Modification History: March 23,2008 Added new feature to encrypt/decrypt cookie
<cfargument name="EncryptionAlgorithm" type="string" required="true"/>
<cfset instance.EncryptionAlgorithm = arguments.EncryptionAlgorithm/>
</cffunction>
-
+
<!--- Get/set Encrypting values or not. --->
<cffunction name="getEncryption" access="public" output="false" returntype="boolean" hint="Get Encryption flag">
<cfreturn instance.Encryption/>
@@ -192,11 +192,11 @@ Modification History: March 23,2008 Added new feature to encrypt/decrypt cookie
<cfargument name="Encryption" type="boolean" required="true"/>
<cfset instance.Encryption = arguments.Encryption/>
</cffunction>
-
+
<!--- Encryption Encoding --->
<cffunction name="getEncryptionEncoding" access="public" output="false" returntype="string" hint="Get EncryptionEncoding value">
<cfreturn instance.EncryptionEncoding/>
- </cffunction>
+ </cffunction>
<cffunction name="setEncryptionEncoding" access="public" output="false" returntype="void" hint="Set EncryptionEncoding value">
<cfargument name="EncryptionEncoding" type="string" required="true"/>
<cfset instance.EncryptionEncoding = arguments.EncryptionEncoding/>
@@ -207,13 +207,13 @@ Modification History: March 23,2008 Added new feature to encrypt/decrypt cookie
<!--- Encrypt Data --->
<cffunction name="encryptIt" access="private" returntype="any" hint="Return encrypted value" output="false">
<cfargument name="encValue" hint="string to be encrypted" required="true" type="string" />
- <cfreturn encrypt(arguments.encValue,getEncryptionKey(),getEncryptionAlgorithm(),getEncryptionEncoding()) />
+ <cfreturn encrypt(arguments.encValue,getEncryptionKey(),getEncryptionAlgorithm(),getEncryptionEncoding()) />
</cffunction>
-
+
<!--- Decrypt Data --->
<cffunction name="decryptIt" access="private" returntype="any" hint="Return decrypted value" output="false">
<cfargument name="decValue" hint="string to be decrypted" required="true" type="string" />
- <cfreturn decrypt(arguments.decValue,getEncryptionKey(),getEncryptionAlgorithm(),getEncryptionEncoding()) />
+ <cfreturn decrypt(arguments.decValue,getEncryptionKey(),getEncryptionAlgorithm(),getEncryptionEncoding()) />
</cffunction>
-
+
</cfcomponent>
Please sign in to comment.
Something went wrong with that request. Please try again.