Ticket #5588 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years 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

My system is windows server 2003 enterprise edition service pack. Trac version is 0.11.5. Doxygen Plugin 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:

Index: doxygentrac.py =================================================================== --- doxygentrac.py (revision 6326) +++ doxygentrac.py (working copy) @@ -62,7 +62,7 @@

'cpp cxx c hpp hxx h', """Space separated list of source files extensions""")

- index = Option('doxygen', 'index', 'main.html', + index = Option('doxygen', 'index', 'index.html',

"""Default index page to pick in the generated documentation.""")

wiki_index = Option('doxygen', 'wiki_index', None,

@@ -162,8 +162,8 @@

# security check path = os.path.abspath(path)

- if not path.startswith(self.base_path): - raise TracError?("Can't access paths outside of " + self.base_path) + #if not path.startswith(self.base_path): + # raise TracError?("Can't access paths outside of " + self.base_path)

# view 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.


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




Change Properties
Action