Modify

Opened 5 years ago

Closed 5 years ago

Last modified 21 months ago

#5588 closed defect (fixed)

Can't access paths outside of a folder

Reported by: zheng.bangyou@… Owned by: 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 (0)

Change History (6)

comment:1 Changed 5 years ago 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?

comment:2 Changed 5 years ago by zheng.bangyou@…

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

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

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

  • doxygentrac.py

     
    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] 

comment:4 Changed 5 years ago by cboos

  • Resolution set to fixed
  • Status changed from new to closed

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

Closes #5588.

comment:5 Changed 5 years ago 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.

comment:6 Changed 21 months ago by rjollos

  • Description modified (diff)

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from cboos. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.