diff options
-rwxr-xr-x | src/proquivs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/proquivs b/src/proquivs index e9ac2e8..ea2d141 100755 --- a/src/proquivs +++ b/src/proquivs @@ -83,6 +83,24 @@ build() local value= ob_parse_control "${ctl}" field_cb '' '' "${FIELDS}" + if [ -n "${field_source}" ] && \ + ! ob_validate_source_name "${field_source}"; then + printf 'proquivs: Error: Invalid source name "%s"\n' \ + "${field_source}" 1>&2 + return 1 + fi + if [ -n "${field_package}" ] && \ + ! ob_validate_binary_name "${field_package}"; then + printf 'proquivs: Error: Invalid package name "%s"\n' \ + "${field_package}" 1>&2 + return 1 + fi + if [ -n "${field_section}" ] && \ + ! ob_validate_section "${field_section}"; then + printf 'proquivs: Error: Invalid section name "%s"\n' \ + "${field_section}" 1>&2 + return 1 + fi if ! mkdir 'proquivs'; then printf 'proquivs: Error: Failed to create package\n' 1>&2 |