![]() |
CernVM-FS
2.13.0
|
#include <sanitizer.h>
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< CharRange > | valid_ranges_ |
Definition at line 28 of file sanitizer.h.
|
explicit |
sanitizer::InputSanitizer::InputSanitizer | ( | const std::string & | whitelist, |
int | max_length | ||
) |
|
inlinevirtual |
Definition at line 34 of file sanitizer.h.
|
protected |
Definition at line 97 of file sanitizer.cc.
Referenced by Sanitize().
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().
|
private |
bool sanitizer::InputSanitizer::IsValid | ( | const std::string & | input | ) | const |
Definition at line 114 of file sanitizer.cc.
Referenced by FileSystem::CheckInstanceName(), MountPoint::CreateDownloadManagers(), publish::SettingsBuilder::CreateSettingsRepository(), cvmfs::cvmfs_getxattr(), cvmfs_suid::EscapeSystemdUnit(), AuthzExternalFetcher::FindHelper(), FuseMain(), OptionsManager::HasConfigRepository(), swissknife::CommandCheck::InspectHistory(), dns::Resolver::IsIpv4Address(), dns::Resolver::IsIpv6Address(), KillCvmfs(), publish::CmdEnter::Main(), publish::CmdMkfs::Main(), swissknife::CommandSync::Main(), main(), and download::DownloadManager::ValidateGeoReply().
|
inlineprotected |
Definition at line 40 of file sanitizer.h.
Referenced by Filter(), IsValid(), sanitizer::IntegerSanitizer::Sanitize(), and sanitizer::PositiveIntegerSanitizer::Sanitize().
|
protectedvirtual |
Reimplemented in sanitizer::PositiveIntegerSanitizer, and sanitizer::IntegerSanitizer.
Definition at line 75 of file sanitizer.cc.
|
private |
Definition at line 51 of file sanitizer.h.
Referenced by Sanitize().
|
private |
Definition at line 52 of file sanitizer.h.
Referenced by CheckRanges(), and InitValidRanges().