You are here: Foswiki>Tasks Web>Item9357 (01 Feb 2013, GeorgeClark)Edit Attach

Item9357: Login with illegal web results in Assert failure, or Uninitialized variable.

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.7
Target Release: patch
Applies To: Engine
Component:
Branches: Release01x01 trunk
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
To recreate:

(If Web is properly capitalized - Asdf then the redirect to login works, and reports the expected The "Asdf" web does not exist after authentication.

Assert error instead of redirect to login screen:

Assertion (this is not a topic object) failed!
 at /var/www/foswiki/trunk/core/lib/Assert.pm line 78
   Assert::ASSERT('', 'this is not a topic object') called at /var/www/foswiki/trunk/core/lib/Foswiki/Meta.pm line 2163
   Foswiki::Meta::latestIsLoaded('Foswiki::Meta=HASH(0x864e500)') called at /var/www/foswiki/trunk/core/lib/Foswiki/Macros/QUERY.pm line 25
   Foswiki::QUERY('Foswiki=HASH(0x84910e0)', 'Foswiki::Attrs=HASH(0x897d478)', 'Foswiki::Meta=HASH(0x864e500)') called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 2988
   Foswiki::_expandMacroOnTopicRendering('Foswiki=HASH(0x84910e0)', 'QUERY', '"{NameFilter}"', 'Foswiki::Meta=HASH(0x864e500)') called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 2878
   Foswiki::_processMacros('Foswiki=HASH(0x84910e0)', '%QUERY{"{NameFilter}"}%', 'CODE(0x8456e78)', 'Foswiki::Meta=HASH(0x864e500)', 14) called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 2896
   Foswiki::_processMacros('Foswiki=HASH(0x84910e0)', '<meta name="foswiki.PUBURL" content="%ENCODE{"%PUBURL%"}%" />...', 'CODE(0x8456e78)', 'Foswiki::Meta=HASH(0x864e500)', 15) called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 2896
   Foswiki::_processMacros('Foswiki=HASH(0x84910e0)', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN...', 'CODE(0x8456e78)', 'Foswiki::Meta=HASH(0x864e500)', 16) called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 2675
   Foswiki::innerExpandMacros('Foswiki=HASH(0x84910e0)', 'SCALAR(0x84576f8)', 'Foswiki::Meta=HASH(0x864e500)') called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 3165
   Foswiki::expandMacros('Foswiki=HASH(0x84910e0)', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN...', 'Foswiki::Meta=HASH(0x864e500)') called at /var/www/foswiki/trunk/core/lib/Foswiki/Meta.pm line 2891
   Foswiki::Meta::expandMacros('Foswiki::Meta=HASH(0x864e500)', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN...') called at /var/www/foswiki/trunk/core/lib/Foswiki/LoginManager/TemplateLogin.pm line 283
   Foswiki::LoginManager::TemplateLogin::login('Foswiki::LoginManager::TemplateLogin=HASH(0x86118e0)', 'Foswiki::Request=HASH(0x848e028)', 'Foswiki=HASH(0x84910e0)') called at /var/www/foswiki/trunk/core/lib/Foswiki/UI.pm line 454
   Foswiki::UI::logon('Foswiki=HASH(0x84910e0)') called at /var/www/foswiki/trunk/core/lib/Foswiki/UI.pm line 310
   Foswiki::UI::__ANON__() called at /usr/lib/perl5/vendor_perl/5.10.1/Error.pm line 415
   eval {...} called at /usr/lib/perl5/vendor_perl/5.10.1/Error.pm line 407
   Error::subs::try('CODE(0x805eb28)', 'HASH(0x8490e10)') called at /var/www/foswiki/trunk/core/lib/Foswiki/UI.pm line 429
   Foswiki::UI::_execute('Foswiki::Request=HASH(0x848e028)', 'CODE(0x8485f58)', 'logon', 1, 'login', 1) called at /var/www/foswiki/trunk/core/lib/Foswiki/UI.pm line 277
   Foswiki::UI::handleRequest('Foswiki::Request=HASH(0x848e028)') called at /var/www/foswiki/trunk/core/lib/Foswiki/Engine/CGI.pm line 30
   Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x81eee68)') called at login line 24
 at /var/www/foswiki/trunk/core/lib/Assert.pm line 78
   Assert::ASSERT('', 'this is not a topic object') called at /var/www/foswiki/trunk/core/lib/Foswiki/Meta.pm line 2163
   Foswiki::Meta::latestIsLoaded('Foswiki::Meta=HASH(0x864e500)') called at /var/www/foswiki/trunk/core/lib/Foswiki/Macros/QUERY.pm line 25
   Foswiki::QUERY('Foswiki=HASH(0x84910e0)', 'Foswiki::Attrs=HASH(0x897d478)', 'Foswiki::Meta=HASH(0x864e500)') called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 2988
   Foswiki::_expandMacroOnTopicRendering('Foswiki=HASH(0x84910e0)', 'QUERY', '"{NameFilter}"', 'Foswiki::Meta=HASH(0x864e500)') called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 2878
   Foswiki::_processMacros('Foswiki=HASH(0x84910e0)', '%QUERY{"{NameFilter}"}%', 'CODE(0x8456e78)', 'Foswiki::Meta=HASH(0x864e500)', 14) called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 2896
   Foswiki::_processMacros('Foswiki=HASH(0x84910e0)', '<meta name="foswiki.PUBURL" content="%ENCODE{"%PUBURL%"}%" />...', 'CODE(0x8456e78)', 'Foswiki::Meta=HASH(0x864e500)', 15) called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 2896
   Foswiki::_processMacros('Foswiki=HASH(0x84910e0)', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN...', 'CODE(0x8456e78)', 'Foswiki::Meta=HASH(0x864e500)', 16) called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 2675
   Foswiki::innerExpandMacros('Foswiki=HASH(0x84910e0)', 'SCALAR(0x84576f8)', 'Foswiki::Meta=HASH(0x864e500)') called at /var/www/foswiki/trunk/core/lib/Foswiki.pm line 3165
   Foswiki::expandMacros('Foswiki=HASH(0x84910e0)', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN...', 'Foswiki::Meta=HASH(0x864e500)') called at /var/www/foswiki/trunk/core/lib/Foswiki/Meta.pm line 2891
   Foswiki::Meta::expandMacros('Foswiki::Meta=HASH(0x864e500)', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN...') called at /var/www/foswiki/trunk/core/lib/Foswiki/LoginManager/TemplateLogin.pm line 283
   Foswiki::LoginManager::TemplateLogin::login('Foswiki::LoginManager::TemplateLogin=HASH(0x86118e0)', 'Foswiki::Request=HASH(0x848e028)', 'Foswiki=HASH(0x84910e0)') called at /var/www/foswiki/trunk/core/lib/Foswiki/UI.pm line 454
   Foswiki::UI::logon('Foswiki=HASH(0x84910e0)') called at /var/www/foswiki/trunk/core/lib/Foswiki/UI.pm line 310
   Foswiki::UI::__ANON__() called at /usr/lib/perl5/vendor_perl/5.10.1/Error.pm line 415
   eval {...} called at /usr/lib/perl5/vendor_perl/5.10.1/Error.pm line 407
   Error::subs::try('CODE(0x805eb28)', 'HASH(0x8490e10)') called at /var/www/foswiki/trunk/core/lib/Foswiki/UI.pm line 429
   Foswiki::UI::_execute('Foswiki::Request=HASH(0x848e028)', 'CODE(0x8485f58)', 'logon', 1, 'login', 1) called at /var/www/foswiki/trunk/core/lib/Foswiki/UI.pm line 277
   Foswiki::UI::handleRequest('Foswiki::Request=HASH(0x848e028)') called at /var/www/foswiki/trunk/core/lib/Foswiki/Engine/CGI.pm line 30
   Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x81eee68)') called at login line 24.

-- GeorgeClark - 19 Jul 2010

What happens if asserts are off? Because this assert actually looks like reasonable behaviour to me, in "debug" mode.

-- CrawfordCurrie - 20 Jul 2010

with Asserts off, Foswiki opens the editor on the Main/WebHome topic.

Rather than going to edit with the wrong topic, using an incorrectly formatted webname should probably return the same error as using a correctly formatted, but missing webname.

Web/topic validations:

  • bin/view/asdf/ -> Main/WebHome
  • bin/view/asdf/Blab -> Oops "(Missing or Illegal) web does not exist"
  • bin/login/asdf/ -> Main/WebHome
  • bin/login/asdf/Blab -> Assertion error
  • bin/login/asdf/Blab -> (Asserts disabled) Topic Blab does not exist (in Main web)
  • bin/edit/asdf/ -> Edit of Main/WebHome
  • bin/edit/asdf/Blab -> Oops "(Missing or Illegal) web does not exist"
  • bin/edit/ -> Edit of Main/WebHome
  • bin/attach/ -> Attaches a file to Main/WebHome
  • bin/attach/system/ -> Attaches to Main/WebHome

-- GeorgeClark - 20 Jul 2010

One other observation. Templates should show the explicit WEB.TOPIC in their headings, so the user can catch things like the incorrect attach.

-- GeorgeClark - 20 Jul 2010

Setting this back to New. This is also related to Item9284 and some other items regarding defaulting web/topic when lower case.

-- GeorgeClark - 28 Aug 2010

Note that on 1.1.3 without asserts, it results in the following error logged:
Use of uninitialized value in -e at /usr/home/foswiki.org/public_html/lib/Foswiki/Store/VC/Handler.pm line 437.

-- GeorgeClark - 21 Sep 2011

Should be OK now

-- CrawfordCurrie - 18 Dec 2012

Some more breakage due to distro:e6bc846fe078 when saving attachments. Only trunk affected.

-- MichaelDaum - 20 Dec 2012
 
Topic revision: r19 - 01 Feb 2013, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy