#include <cctype>#include <grp.h>#include <cstdio>#include <list>#include <vector>#include <unordered_set>#include <algorithm>#include <charconv>#include <regex.h>#include <fcntl.h>#include <math.h>#include <pwd.h>#include <sys/stat.h>#include <sys/types.h>#include <map>#include <iomanip>#include "XrdNet/XrdNetUtils.hh"#include "XrdOuc/XrdOucCRC.hh"#include "XrdOuc/XrdOucEnv.hh"#include "XrdOuc/XrdOucSHA3.hh"#include "XrdOuc/XrdOucStream.hh"#include "XrdOuc/XrdOucString.hh"#include "XrdOuc/XrdOucUtils.hh"#include "XrdOuc/XrdOucPrivateUtils.hh"#include "XrdSys/XrdSysE2T.hh"#include "XrdSys/XrdSysError.hh"#include "XrdSys/XrdSysPlatform.hh"#include "XrdSys/XrdSysPthread.hh"Go to the source code of this file.
Macros | |
| #define | ENODATA ENOATTR |
| #define | SHFT(k) |
| #define | SHFT(k, m) |
Functions | |
| static int | from_hex (char c) |
| static bool | is_rfc3986_unreserved (unsigned char c) |
| static bool | is_token_character (int c) |
| std::string | obfuscateAuth (const std::string &input) |
| void | stripCgi (std::string &url, const std::unordered_set< std::string > &cgiKeys) |
| void | stripCgi (XrdOucString &url, const std::unordered_set< std::string > &cgiKeys) |
| #define ENODATA ENOATTR |
Definition at line 68 of file XrdOucUtils.cc.
| #define SHFT | ( | k | ) |
Referenced by XrdOucUtils::Log10(), and XrdOucUtils::Log2().
| #define SHFT | ( | k, | |
| m ) |
|
static |
Definition at line 1654 of file XrdOucUtils.cc.
Referenced by XrdOucUtils::UrlDecode().
|
static |
Definition at line 1623 of file XrdOucUtils.cc.
Referenced by XrdOucUtils::UrlEncode().
|
static |
Returns a boolean indicating whether 'c' is a valid token character or not. See https://datatracker.ietf.org/doc/html/rfc6750#section-2.1 for details.
Definition at line 1569 of file XrdOucUtils.cc.
Referenced by obfuscateAuth(), and stripCgi().
| std::string obfuscateAuth | ( | const std::string & | input | ) |
This function obfuscates away authz= cgi elements and/or HTTP authorization headers from URL or other log line strings which might contain them.
| input | the string to obfuscate |
Definition at line 1591 of file XrdOucUtils.cc.
References is_token_character().
Referenced by XrdPfc::Cache::Attach(), XrdPosixXrootd::Close(), XrdPosixFile::DelayedDestroy(), XrdPosixFile::DelayedDestroy(), XrdPosixPrepIO::Disable(), XrdCl::URL::FromString(), XrdPssSys::FSctl(), XrdPssCks::Get(), XrdCl::URL::GetObfuscatedURL(), XrdCl::Utils::LogPropertyList(), main(), XrdPssSys::Mkdir(), XrdPssFile::Open(), XrdPssDir::Opendir(), XrdHttpProtocol::Process(), XrdHttpReq::ProcessHTTPReq(), XrdPssSys::Remdir(), XrdPssSys::Rename(), XrdCl::Message::SetDescription(), XrdPssSys::Stat(), XrdPssSys::Truncate(), and XrdPssSys::Unlink().
| void stripCgi | ( | std::string & | url, |
| const std::unordered_set< std::string > & | cgiKeys ) |
Strip selected CGI elements (e.g. "authz=...") from a string/URL.
| url | the string/URL to sanitize |
| cgiKeys | CGI parameter names to remove (without the trailing '=') |
Definition at line 1698 of file XrdOucUtils.cc.
References is_token_character().
Referenced by XrdHttpReq::Redir(), and stripCgi().
| void stripCgi | ( | XrdOucString & | url, |
| const std::unordered_set< std::string > & | cgiKeys ) |
Definition at line 1725 of file XrdOucUtils.cc.
References XrdOucString::c_str(), and stripCgi().