sm-sorcery-bugs AT lists.ibiblio.org
Subject: Bugs for Sorcery are reported here
List archive
[SM-Sorcery-Bugs] [Bug 13729] New: url_generic_apifunc ignores url_get_prefix exit status
- From: bugzilla-daemon AT bugs.sourcemage.org
- To: sm-sorcery-bugs AT lists.ibiblio.org
- Subject: [SM-Sorcery-Bugs] [Bug 13729] New: url_generic_apifunc ignores url_get_prefix exit status
- Date: 19 Apr 2007 20:05:27 -0000
http://bugs.sourcemage.org/show_bug.cgi?id=13729
Summary: url_generic_apifunc ignores url_get_prefix exit status
Product: Sorcery
Version: 1.14.x
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P2
Component: subroutines
AssignedTo: sm-sorcery-bugs AT lists.ibiblio.org
ReportedBy: jakakranjc AT email.si
url_get_prefix returns 1 if it couldn't get the prefix. However
url_generic_apifunc ignores it, which results in it calling the default
function. This is bad in the case of url_default_verify (didn't check the
others), since it always returns true - url_verify can succed on really bad
urls.
So I think a sanity check is in order, something like:
[[ -z $tmp_prefix ]] && return 1
492 function url_generic_apifunc() {
493 local tmp_func=$1
494 shift
495 local tmp_url=$1 tmp_prefix
496 tmp_prefix=$(url_get_prefix $1)
497 if misc_is_function url_${tmp_prefix}_${tmp_func}; then
498 url_${tmp_prefix}_${tmp_func} "$@"
499 else
500 url_default_${tmp_func} "$@"
501 fi
502 }
--
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
- [SM-Sorcery-Bugs] [Bug 13729] New: url_generic_apifunc ignores url_get_prefix exit status, bugzilla-daemon, 04/19/2007
Archive powered by MHonArc 2.6.24.