• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

I've recently upgraded a twiki02 installation to twiki03, then to twiki04 (TWiki Patch Release 4.0.2).

I'm using mod_perl 2.0.2 on Apache 2.2.0, and I have "PerlSwitches -T" (taint checking) activated.

When I try to attach a file to a topic, I get the following error:

Software error:

Unmatched ( in regex; marked by <-- HERE in m/^/bin/oops/Sandbox/TestStyliDlaTopic2?template=oopsattention;def=save_error;param1=Insecure%20dependency%20in%20exec%20while%20running%20setgid%20at%20/home/twiki/lib/TWiki/Sandbox.pm%20line%20317.%0a%20at%20/home/twiki/lib/TWiki/Sandbox.pm%20line%20317%0a%09TWiki::Sandbox::sysCommand( <-- HERE 'TWiki::Sandbox%3dHASH(0x555555d5d720)'%2c%20'/usr/bin/ci%20%20-q%20-l%20-m%22%COMMENT%%22%20-t-none%20-w%22%USERNAME%%22%20%FILE...'%2c%20'USERNAME'%2c%20'AleksanderAdamowski'%2c%20'FILENAME'%2c%20'/home/twiki/pub/ at (eval 19) line 14.

For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error. 

The server logs have more details:

==> httpd/ssl_error_log <==
[Thu May 04 00:39:27 2006] [error] [Thu May  4 00:39:27 2006] -e: Unmatched ( in regex; marked by <-- HERE in m/^/bin/oops/Sandbox/TestStyliDlaTopic2?template=oopsattention;def=save_error;param1=Insecure%20dependency%20in%20exec%20while%20running%20setgid%20at%20/home/twiki/lib/TWiki/Sandbox.pm%20line%20317.%0a%20at%20/home/twiki/lib/TWiki/Sandbox.pm%20line%20317%0a%09TWiki::Sandbox::sysCommand( <-- HERE 'TWiki::Sandbox%3dHASH(0x555555d5d720)'%2c%20'/usr/bin/ci%20%20-q%20-l%20-m%22%COMMENT%%22%20-t-none%20-w%22%USERNAME%%22%20%FILE...'%2c%20'USERNAME'%2c%20'AleksanderAdamowski'%2c%20'FILENAME'%2c%20'/home/twiki/pub/ at (eval 19) line 14.\n
[Thu May 04 00:39:28 2006] [error] [client 83.6.73.81] File does not exist: /var/www/hosts/twiki.altkom.pl/docs/favicon.ico

==> httpd/ssl_access_log <==
83.6.73.81 - olo [04/May/2006:00:39:27 +0200] "GET /bin/oops/Sandbox/TestStyliDlaTopic2?template=oopsattention;def=save_error;param1=Insecure%20dependency%20in%20exec%20while%20running%20setgid%20at%20/home/twiki/lib/TWiki/Sandbox.pm%20line%20317.%0a%20at%20/home/twiki/lib/TWiki/Sandbox.pm%20line%20317%0a%09TWiki::Sandbox::sysCommand('TWiki::Sandbox%3dHASH(0x555555d5d720)'%2c%20'/usr/bin/ci%20%20-q%20-l%20-m%22%COMMENT%%22%20-t-none%20-w%22%USERNAME%%22%20%FILE...'%2c%20'USERNAME'%2c%20'AleksanderAdamowski'%2c%20'FILENAME'%2c%20'/home/twiki/pub/Sandbox/TestStyliDlaTopic2/gamma.png'%2c%20'COMMENT'%2c%20'gamma')%20called%20at%20/home/twiki/lib/TWiki/Store/RcsWrap.pm%20line%20392%0a%09TWiki::Store::RcsWrap::_ci('TWiki::Store::RcsWrap%3dHASH(0x555556cfe5b0)'%2c%20'gamma'%2c%20'AleksanderAdamowski'%2c%20'undef')%20called%20at%20/home/twiki/lib/TWiki/Store/RcsWrap.pm%20line%20124%0a%09TWiki::Store::RcsWrap::addRevisionFromStream('TWiki::Store::RcsWrap%3dHASH(0x555556cfe5b0)'%2c%20'Fh%3dGLOB(0x555555ffb660)'%2c%20'gamma'%2c%20'AleksanderAdamowski')%20called%20at%20/home/twiki/lib/TWiki/Store.pm%20line%20914%0a%09TWiki::Store::__ANON__()%20called%20at%20/home/twiki/lib/CPAN/lib///Error.pm%20line%20387%0a%09eval%20%7b...%7d%20called%20at%20/home/twiki/lib/CPAN/lib///Error.pm%20line%20379%0a%09Error::subs::try('CODE(0x555556d34f30)'%2c%20'HASH(0x555556d351d0)')%20called%20at%20/home/twiki/lib/TWiki/Store.pm%20line%20919%0a%09TWiki::Store::__ANON__()%20called%20at%20/home/twiki/lib/CPAN/lib///Error.pm%20line%20387%0a%09eval%20%7b...%7d%20called%20at%20/home/twiki/lib/CPAN/lib///Error.pm%20line%20379%0a%09Error::subs::try('CODE(0x555556cfda00)'%2c%20'HASH(0x555556d34b70)')%20called%20at%20/home/twiki/lib/TWiki/Store.pm%20line%20965%0a%09TWiki::Store::saveAttachment('TWiki::Store%3dHASH(0x555556689e50)'%2c%20'Sandbox'%2c%20'TestStyliDlaTopic2'%2c%20'gamma.png'%2c%20'TWiki::User%3dHASH(0x555555eb8f00)'%2c%20'HASH(0x555555ebaf30)')%20called%20at%20/home/twiki/lib/TWiki/UI/Upload.pm%20line%20226%0a%09TWiki::UI::Upload::__ANON__()%20called%20at%20/home/twiki/lib/CPAN/lib///Error.pm%20line%20387%0a%09eval%20%7b...%7d%20called%20at%20/home/twiki/lib/CPAN/lib///Error.pm%20line%20379%0a%09Error::subs::try('CODE(0x555555ebda00)'%2c%20'HASH(0x555555ebcd60)')%20called%20at%20/home/twiki/lib/TWiki/UI/Upload.pm%20line%20243%0a%09TWiki::UI::Upload::upload('TWiki%3dHASH(0x555555c35d00)')%20called%20at%20/home/twiki/lib/TWiki/UI.pm%20line%2097%0a%09TWiki::UI::__ANON__()%20called%20at%20/home/twiki/lib/CPAN/lib///Error.pm%20line%20387%0a%09eval%20%7b...%7d%20called%20at%20/home/twiki/lib/CPAN/lib///Error.pm%20line%20379%0a%09Error::subs::try('CODE(0x555556cfe730)'%2c%20'HASH(0x555556cfe600)')%20called%20at%20/home/twiki/lib/TWiki/UI.pm%20line%20146%0a%09TWiki::UI::run('CODE(0x555556678770)')%20called%20at%20/var/www/hosts/twiki.altkom.pl/docs/bin/upload%20line%2032%0a%09ModPerl::ROOT::ModPerl::Registry::var_www_hosts_twiki_2ealtkom_2epl_docs_bin_upload::handler('Apache2::RequestRec%3dSCALAR(0x5555558f7720)')%20called%20at%20/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/ModPerl/RegistryCooker.pm%20line%20203%0a%09eval%20%7b...%7d%20called%20at%20/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/ModPerl/RegistryCooker.pm%20line%20203%0a%09ModPerl::RegistryCooker::run('ModPerl::Registry%3dHASH(0x5555558f7810)')%20called%20at%20/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/ModPerl/RegistryCooker.pm%20line%20169%0a%09ModPerl::RegistryCooker::default_handler('ModPerl::Registry%3dHASH(0x5555558f7810)')%20called%20at%20/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/ModPerl/Registry.pm%20line%2030%0a%09ModPerl::Registry::handler('ModPerl::Registry'%2c%20'Apache2::RequestRec%3dSCALAR(0x5555558f7720)')%20called%20at%20-e%20line%200%0a%09eval%20%7b...%7d%20called%0a HTTP/1.1" 500 794

The source of the problem seems to be:

Insecure dependency in exec while running setgid at /home/twiki/lib/TWiki/Sandbox.pm line 317


This looks similar to problem I had myself when upgrading from Cairo. The upgrade script occasionally seems to leave bogus declarations for RCS commands in lib/LocalSite.cfg.

If you are running Unix/Linux, and you find statements beginning with $cfg{RCS}{...}= in your lib/LocalSite.cfg, try to delete these statements (or better, comment them out with '#' in the first column).

If this doesn't help (or you are not running Unix/Linux) then I'm afraid we'll need more information about your installation, like Operating system and your LocalSite.cfg (delete the entry $TWiki::cfg{Password} before attaching).

-- TWiki:Main.HaraldJoerg

No feedback forthcoming, so discarding this.

CC

Oops sorry for the last change, wrong bug.

Regarding this one, TWiki:Main.HaraldJoerg was right - commenting out leftover declarations in lib/LocalSite.cfg has solved the problem and I can attach topics with taint checking activated in Apache configuration.

The leftover lines in lib/LocalSite.cfg were:

$cfg{RCS}{ciCmd} = "/usr$cfg{ScriptUrlPath}/ci  -q -l -m\"%COMMENT%\" -t-none -w\"%USERNAME%\" %FILENAME%"; # /usr/bin/ci  -q -u -m"%COMMENT%" -t-none -w"%USERNAME%" %FILENAME%
$cfg{RCS}{unlockCmd} = "/usr$cfg{ScriptUrlPath}/rcs  -q -u %FILENAME%"; # /usr/bin/rcs  -q -u -M %FILENAME%
$cfg{RCS}{ciDateCmd} = "/usr$cfg{ScriptUrlPath}/ci -l  -q -mnone -t-none -d\"%DATE%\" -w\"%USERNAME%\" %FILENAME%"; # /usr/bin/ci -u  -q -mnone -t-none -d"%DATE%" -w"%USERNAME%" %FILENAME%

Thanks for the suggestion!

IMHO, upgrade scripts could do the commenting out automatically, but I'm closing this bug for now.

-- AleksanderAdamowski - 15 May 2006

I ran into something similar, though not identical to this, which turned out to have the same cause. My symptoms were that when someone attached a file with a comment, the attachment would have no version history (or would lose its version history if it had it before). If they left the comment field blank, it was fine. From looking at the backend files it was clear that such attachments were not being checked into RCS correctly - the RCS files were present but had nothing but a header. No errors were reported or logged, it was a totally silent failure. Only when I enabled trace() in Sandbox.pm did an error come out, and even then it was a meta-error as above: that is, TWiki's attempt to report a taint error with the checkin command (using the oops mechanism) was itself failing.

Anyway, I'm happy to have found the answer here: commenting out those three lines from LocalSite.cfg did the trick. And yes, our site was upgraded from Cairo to Dakar so I guess they were left over from that.

-- BenWheeler - 03 Jul 2007

ItemTemplate
Summary "Insecure dependency in exec while running setgid at /home/twiki/lib/TWiki/Sandbox.pm" when attaching files
ReportedBy TWiki:Main.AleksanderAdamowski
Codebase 4.0.2, 4.0.4
SVN Range TWiki 4.0.2
AppliesTo Engine
Component

Priority Urgent
CurrentState Closed
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2007-07-03 - TWikiUserMapping_BenWheeler
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback