Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3401933
D4137.id13208.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
720 B
Referenced Files
None
Subscribers
None
D4137.id13208.diff
View Options
diff --git a/services/tunnelbroker/src/Tools/ConfigManager.cpp b/services/tunnelbroker/src/Tools/ConfigManager.cpp
--- a/services/tunnelbroker/src/Tools/ConfigManager.cpp
+++ b/services/tunnelbroker/src/Tools/ConfigManager.cpp
@@ -94,7 +94,14 @@
throw std::runtime_error(
"ConfigManager Error: config parameter " + param + " is not set.");
}
- return this->variablesMap[param].as<std::string>();
+ const std::string parameterValue =
+ this->variablesMap[param].as<std::string>();
+ if (parameterValue.empty()) {
+ throw std::runtime_error(
+ "ConfigManager Error: config parameter " + param +
+ " can not be empty.");
+ }
+ return parameterValue;
}
} // namespace config
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 2:35 PM (2 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2612023
Default Alt Text
D4137.id13208.diff (720 B)
Attached To
Mode
D4137: [services] Tunnelbroker - Check for an empty string in ConfigManager
Attached
Detach File
Event Timeline
Log In to Comment