CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sanitizer::InputSanitizer Class Reference

#include <sanitizer.h>

Inheritance diagram for sanitizer::InputSanitizer:

Public Member Functions

 InputSanitizer (const std::string &whitelist)
 
 InputSanitizer (const std::string &whitelist, int max_length)
 
virtual ~InputSanitizer ()
 
std::string Filter (const std::string &input) const
 
bool IsValid (const std::string &input) const
 

Protected Member Functions

bool Sanitize (const std::string &input, std::string *filtered_output) const
 
virtual bool Sanitize (std::string::const_iterator begin, std::string::const_iterator end, std::string *filtered_output) const
 
bool CheckRanges (const char chr) const
 

Private Member Functions

void InitValidRanges (const std::string &whitelist)
 

Private Attributes

int max_length_
 
std::vector< CharRangevalid_ranges_
 

Detailed Description

Definition at line 28 of file sanitizer.h.

Constructor & Destructor Documentation

sanitizer::InputSanitizer::InputSanitizer ( const std::string &  whitelist)
explicit
sanitizer::InputSanitizer::InputSanitizer ( const std::string &  whitelist,
int  max_length 
)
virtual sanitizer::InputSanitizer::~InputSanitizer ( )
inlinevirtual

Definition at line 34 of file sanitizer.h.

Member Function Documentation

bool sanitizer::InputSanitizer::CheckRanges ( const char  chr) const
protected

Definition at line 97 of file sanitizer.cc.

Referenced by Sanitize().

Here is the caller graph for this function:

string sanitizer::InputSanitizer::Filter ( const std::string &  input) const

Definition at line 107 of file sanitizer.cc.

Referenced by download::DownloadManager::InitHeaders(), and download::DownloadManager::ValidateGeoReply().

Here is the call graph for this function:

Here is the caller graph for this function:

void sanitizer::InputSanitizer::InitValidRanges ( const std::string &  whitelist)
private

Definition at line 51 of file sanitizer.cc.

Here is the call graph for this function:

bool sanitizer::InputSanitizer::Sanitize ( const std::string &  input,
std::string *  filtered_output 
) const
inlineprotected

Definition at line 40 of file sanitizer.h.

Referenced by Filter(), IsValid(), sanitizer::IntegerSanitizer::Sanitize(), and sanitizer::PositiveIntegerSanitizer::Sanitize().

Here is the caller graph for this function:

bool sanitizer::InputSanitizer::Sanitize ( std::string::const_iterator  begin,
std::string::const_iterator  end,
std::string *  filtered_output 
) const
protectedvirtual

Reimplemented in sanitizer::PositiveIntegerSanitizer, and sanitizer::IntegerSanitizer.

Definition at line 75 of file sanitizer.cc.

Here is the call graph for this function:

Member Data Documentation

int sanitizer::InputSanitizer::max_length_
private

Definition at line 51 of file sanitizer.h.

Referenced by Sanitize().

std::vector<CharRange> sanitizer::InputSanitizer::valid_ranges_
private

Definition at line 52 of file sanitizer.h.

Referenced by CheckRanges(), and InitValidRanges().


The documentation for this class was generated from the following files: