Skip to Content.
Sympa Menu

sm-sorcery-bugs - [SM-Sorcery-Bugs] [Bug 6981] New url handler: url_tla

sm-sorcery-bugs AT lists.ibiblio.org

Subject: Bugs for Sorcery are reported here

List archive

Chronological Thread  
  • From: bugzilla-daemon AT bugs.sourcemage.org
  • To: sm-sorcery-bugs AT lists.ibiblio.org
  • Subject: [SM-Sorcery-Bugs] [Bug 6981] New url handler: url_tla
  • Date: Mon, 14 Feb 2005 11:26:49 -0800 (PST)

http://bugs.sourcemage.org/show_bug.cgi?id=6981


acedit AT armory.com changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED




------- Additional Comments From acedit AT armory.com 2005-02-14 11:26 -------
for future reference this code needed a LOT of work:
do not ever use tabs, always use 8 spaces (granted thats not highly
documented,
so i'll let it go)
lines should never exceed 80 characters, wrap them (same as above, other url
handlers have this problem too)
copyright is to SourceMage, as was discussed on ML
if [ -z "$TLA_LOCATION" -o -z "TLA_ARCHIVE" -o -z "TLA_REVISION" ]; does not
work, the second two variables are missing $, so this would always return
false
no matter what input you gave, which means you could pass in a number of
really
awful inputs and it would keep running.
S_FILE=`message $FILE | should be echo, message is for user messages
you have very little error checking in the sequences of tla commands, you
should
string them together with &&'s then check the return code right afterwards
in the check for nocache being on, you return $? which is almost certainly 0
given the last commands run inside the previous if, with proper error checking
that code shouldnt get run on error
you redundantly check for the existence of the $S_FILE directory during the
cache tarball creation, also the final if statement around that code is
useless
as $? is the value of previously run 'fi' command which will always be true
you never do any sanity checking on $S_FILE, which could lead to an rm -rf /
if
somneone tried hard enough
you completely left out url_tla_hostname and url_tla_netselect functions!!!

Obviously you did not test it very thoroughly (or even proofread it) since a
number of things could have easily broken it. This is bordering on
unacceptable
and im not really very pleased at having to clean it all up. Since it'd be
more
work for me to try and get you to fix the problems above, I'll just do it
myself. For future reference please proofread your code more thoroughly before
submitting directly to the sorcery codebase.


--
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




Archive powered by MHonArc 2.6.24.

Top of Page