Opened 9 years ago

Closed 9 years ago

Last modified 6 years ago

#5588 closed defect (fixed)

Can't access paths outside of a folder

Reported by: Bangyou Zheng Owned by: Christian Boos
Priority: normal Component: DoxygenPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

My system is windows server 2003 enterprise edition service pack. Trac version is 0.11.5. DoxygenPlugin is to check out from svn.

The setting in TracIni is:

path = D:/xampp/htdocs/project/doc
html_output = html

But I get a error message like this

Can't access paths outside of D:/xampp/htdocs/project/doc

How can I fix the problem?

Thank you very much

Attachments (0)

Change History (6)

comment:1 Changed 9 years ago by Christian Boos

What is the URL you're trying to browse when that error appears? Please also give the relevant excerpt of your trac.log, at DEBUG level.

Also, I assume that path exists and contains the html folder?

comment:2 Changed 9 years ago by Bangyou Zheng

The url is:

Of course, the path is exists and contains a html folder

The trac.log:

2009-07-30 17:36:23,546 Trac[main] DEBUG: Dispatching <Request "GET u'/doxygen/'">
2009-07-30 17:36:23,546 Trac[doxygentrac] DEBUG: Performing index(,None)"
2009-07-30 17:36:23,546 Trac[doxygentrac] DEBUG: path: D:/xampp/htdocs/project/doc\html\main.html
2009-07-30 17:36:23,546 Trac[main] WARNING: HTTPInternalError: 500 Trac Error (Can't access paths outside of D:/xampp/htdocs/project/doc)
2009-07-30 17:36:23,546 Trac[chrome] DEBUG: Prepare chrome data for request
2009-07-30 17:36:23,562 Trac[session] DEBUG: Retrieving session for ID u'byzheng'
2009-07-30 17:36:23,640 Trac[main] DEBUG: Dispatching <Request "GET u'/chrome/common/css/trac.css'">
2009-07-30 17:36:23,655 Trac[main] DEBUG: Dispatching <Request "GET u'/chrome/common/js/jquery.js'">
2009-07-30 17:36:23,733 Trac[main] DEBUG: Dispatching <Request "GET u'/chrome/common/js/trac.js'">
2009-07-30 17:36:23,765 Trac[main] DEBUG: Dispatching <Request "GET u'/chrome/common/js/search.js'">
2009-07-30 17:36:23,780 Trac[main] DEBUG: Dispatching <Request "GET u'/chrome/common/trac_logo_mini.png'">
2009-07-30 17:36:23,812 Trac[main] DEBUG: Dispatching <Request "GET u'/chrome/common/dots.gif'">
2009-07-30 17:36:23,812 Trac[main] DEBUG: Dispatching <Request "GET u'/chrome/common/topbar_gradient2.png'">
2009-07-30 17:36:23,812 Trac[main] DEBUG: Dispatching <Request "GET u'/chrome/common/topbar_gradient.png'">

comment:3 Changed 9 years ago by zheng.bangyou@…

My problem have been solved by just comment "security check". This is the diff file:


    6262      'cpp cxx c hpp hxx h',
    6363      """Space separated list of source files extensions""")
    65     index = Option('doxygen', 'index', 'main.html',
     65    index = Option('doxygen', 'index', 'index.html',
    6666      """Default index page to pick in the generated documentation.""")
    6868    wiki_index = Option('doxygen', 'wiki_index', None,
    163163        # security check
    164164        path = os.path.abspath(path)
    165         if not path.startswith(self.base_path):
    166             raise TracError("Can't access paths outside of " + self.base_path)
     165        #if not path.startswith(self.base_path):
     166        #    raise TracError("Can't access paths outside of " + self.base_path)
    168168        # view
    169169        mimetype = mimetypes.guess_type(path)[0]

comment:4 Changed 9 years ago by Christian Boos

Resolution: fixed
Status: newclosed

(In [6328]) DoxygenPlugin: add Windows compatibility.

Closes #5588.

comment:5 Changed 9 years ago by Christian Boos

I've also considered your other change (set the default index to 'index.html' instead of 'main.html'). There's a problem with that change:

  • if you're using the GENERATE_TREEVIEW mode, by including index.html you'll get the frameset, so you see nothing but there's no error: that's hard to troubleshoot; with main.html everything is fine in this case
  • if you're not using GENERATE_TREEVIEW, by including main.html you'll get at least an error which is then easy to troubleshoot

So I'll leave that change for the day the plugin supports the GENERATE_TREEVIEW mode of Doxygen.

comment:6 Changed 6 years ago by Ryan J Ollos

Description: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Christian Boos.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.