Ticket #5588 (closed defect: fixed)

Opened 4 years ago

Last modified 7 months ago

Can't access paths outside of a folder

Reported by: zheng.bangyou@gmail.com Assigned to: cboos
Priority: normal Component: DoxygenPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description (Last modified by rjollos)

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:

[doxygen]
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

Change History

07/30/09 10:27:19 changed by cboos

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?

07/30/09 11:40:54 changed by zheng.bangyou@gmail.com

The url is: http://202.112.170.198/trac/project/doxygen/

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'">

08/06/09 10:00:10 changed by zheng.bangyou@gmail.com

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

  • doxygentrac.py

    old new  
    6262      'cpp cxx c hpp hxx h', 
    6363      """Space separated list of source files extensions""") 
    6464 
    65     index = Option('doxygen', 'index', 'main.html', 
     65    index = Option('doxygen', 'index', 'index.html', 
    6666      """Default index page to pick in the generated documentation.""") 
    6767 
    6868    wiki_index = Option('doxygen', 'wiki_index', None, 
     
    162162 
    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) 
    167167 
    168168        # view 
    169169        mimetype = mimetypes.guess_type(path)[0] 

08/06/09 16:59:47 changed by cboos

  • status changed from new to closed.
  • resolution set to fixed.

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

Closes #5588.

08/06/09 17:12:59 changed by cboos

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.

10/21/12 23:07:14 changed by rjollos

  • description changed.

Add/Change #5588 (Can't access paths outside of a folder)




Change Properties
Action