commit f69b4389539e0b04a47bc37facdb03bdd3cd3c9b parent 6379cb0c0fa848f61ec30c434aed2d6b81d4ad49 Author: Slack Coder <slackcoder@server.ky> Date: Tue, 28 Jan 2025 15:58:04 -0500 Ensure home directory is an absolute path Diffstat:
| M | ChangeLog.md | | | 1 | + |
| M | SBO-Lib/lib/SBO/Lib/Util.pm | | | 4 | ++++ |
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/ChangeLog.md b/ChangeLog.md @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file. ### Fixed + - Expect SBO_HOME to be an absolute path. Thanks pghvlaans! - Tests under 't/' for 15.0. ## [2.7.2] - 2024-12-03 diff --git a/SBO-Lib/lib/SBO/Lib/Util.pm b/SBO-Lib/lib/SBO/Lib/Util.pm @@ -422,7 +422,11 @@ sub read_config { } else { warn "Unable to open $conf_file.\n" if -f $conf_file; } + $config{SBO_HOME} = '/usr/sbo' if $config{SBO_HOME} eq 'FALSE'; + unless ($config{SBO_HOME} =~ qr#^(/|$)#) { + usage_error( "The configuration parameter SBO_HOME must be an absolute path."); + } } =head2 script_error