Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

lfabbric/sanitize-models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

18 Commits

Repository files navigation

SanitizeModels

Purpose

Identify and exclude fields from objects and nested objects when using the renderWith feature. An example would be to exclude a hashpassword and lastipaddress when rendering JSON

Installation

Copy zip file to your plugins folder. It should just work.

Basics

You can either set an overriding setting to ensure that every renderWith method is sanitized or you can specify during each use.

config/settings.cfm

<cfset set(functionName="renderWith", sanitize=true)>

controllers

renderWith(data=item, sanitize=true);

Setup

identify fields that should be sanitized from your Model components.

component extends="Model" {

public function init() {
table("tableName");
...
excludeFields(['hashedpassword','lastipaddress']);
return this;
}
...
}

About

No description or website provided.

Topics

Resources

Readme

License

MIT license

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors