Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[gitHub #1377] [Solved] Hide 'Vanilla has already been installed'

jcwebdevjcwebdev New
edited June 2012 in Vanilla 2.0 - 2.8

When I browse to /path/to/vanilla/forum/setup/ I'm presented with a very detailed error message that outlines where Vanilla has been installed to.

This gives away too much system information for my liking and I'd like to hide the page. I can see the error message is being generated by:

forum/applications/dashboard/controllers/class.setupcontroller.php

Is it possible to disable this page without hacking the PHP code in this file?

Best Answer

  • x00x00 MVP
    Answer ✓

    Server rule have some nuances, which can be specific to your setup

    I may be easier to use vanilla routes. dashboard/routes->Add Route

    Route Expression

    (dashboard/)?setup(/.*)?

    Target

    dashboard/home/filenotfound

    Type

    Not Found (404)

    You could also use it to redirect to a custom page. I would say report this on git hub becuase is still triggers even if debugging is off. it should really show 'Bonk!' as default.
    https://github.com/vanillaforums/Garden/issues

    grep is your friend.

Answers

  • yes with server rules like .htaccess something like so

    RewriteRule ^setup(/.*)$ dashboard/home/filenotfound [R=404, L]

    grep is your friend.

  • This gives me a 500 internal redirect error.

    I've got Vanilla installed in a subfolder or the domain root but have modified my .htaccess accordingly.

  • x00x00 MVP
    edited June 2012

    This works

    ErrorDocument 404 /path/to/forum/dashboard/home/filenotfound 
    
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(dashboard/)?setup(/.*)? - [L]
    

    change /path/to/forum

    grep is your friend.

  • This doesn't work either. No 500 error but it doesn't hide the setup page output.

    Tried a few combinations but I can't get it to work. Any thoughts?

  • Alternatively, would it be possible just to setup Vanilla to return a simple message saying that it has already been installed as opposed to revealing system paths?

  • x00x00 MVP
    Answer ✓

    Server rule have some nuances, which can be specific to your setup

    I may be easier to use vanilla routes. dashboard/routes->Add Route

    Route Expression

    (dashboard/)?setup(/.*)?

    Target

    dashboard/home/filenotfound

    Type

    Not Found (404)

    You could also use it to redirect to a custom page. I would say report this on git hub becuase is still triggers even if debugging is off. it should really show 'Bonk!' as default.
    https://github.com/vanillaforums/Garden/issues

    grep is your friend.

  • Sweet, this worked a treat and I've reported it to GitHub as suggested.

  • jcwebdev said:
    Sweet, this worked a treat and I've reported it to GitHub as suggested.

    Suggestion number on gitHub? So I can add it to the topic title

    There was an error rendering this rich post.

  • GitHub number 1377

Sign In or Register to comment.