Forums Instiki

Instiki hyperlinks failures

Subscribe to Instiki hyperlinks failures 4 posts, 2 voices

 
nkay 8 posts

edited 5 years ago

I am having an issues with hyperlinks with our WIKI page using the textile markup. Hyperlinks to external webpages work eg. “www.google.com” but any internal html pages within the instiki filesystem end up getting application errors.
We have a folder inside the main Web folder called Wiki_files which has many different HTML files but if we link to any of them e.g…

“Environment Configuration”:http://acesrep:2500/aces/wiki_files/environments/AcesEnvironments.html)

I receive “Internal Error” An application error occurred while processing your request. Looking at the source of the page I get these dumps.

(d:/instiki-0.19.6/vendor/rails/actionpack/lib/action_controller/base.rb:1339:in perform_action' d:/instiki-0.19.6/vendor/rails/actionpack/lib/action_controller/filters.rb:617:in call_filters’ d:/instiki-0.19.6/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in block in run_before_filters' d:/instiki-0.19.6/vendor/rails/actionpack/lib/action_controller/filters.rb:206:in call’ d:/instiki-0.19.6/vendor/rails/actionpack/lib/action_controller/filters.rb:206:in block in around_proc' d:/instiki-d:/0.19.6/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in call’ d:/instiki-0.19.6/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in evaluate_method' d:/instiki-0.19.6/vendor/rails/actionpack/lib/action_controller/filters.rb:184:in call’ d:/instiki-0.19.6/vendor/rails/actionpack/lib/action_controller/filters.rb:635:in run_before_filters' d:/instiki-0.19.6/vendor/rails/actionpack/lib/action_controller/filters.rb:615:in call_filters’ d:/instiki-0.19.6/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in `block in run_before_filters')


If I open up the HTML document within the server itself it works fine but not as a link through instiki wiki.

 
distler Moderator 110 posts

How about

"Environment Configuration":/aces/wiki_files/environments/AcesEnvironments.html

?

I don’t know how well Textile handles the “:” in the URL you were using.

 
nkay 8 posts

Thanks for the response. Unfortunately the same error occurs. I have tried many different syntax’s each resulting the same error.

I did figure out that if I tried to upload a file into instiki (which automatically creates a ‘files’ folder in the Webs directory, and moved the html file to the newly created ‘files’ folder and update the code I can get it to not error out. If I create additional folders nested in the ‘files’ folder than it errors back out. I checked permissions on the folders and everything is fine.

I guess also a functionality thing I noticed is that if you click on the hyperlink to an local hosted html page. Instiki calls up a download box within the browser and asks the user if they want to save the html file locally, instead of actually opening the page within the browser as an actual webpage. Is this an issue or just how instiki displays local html files?

 
distler Moderator 110 posts

I did figure out that if I tried to upload a file into instiki (which automatically creates a ‘files’ folder in the Webs directory, and moved the html file to the newly created ‘files’ folder …

Oh. I think I misunderstood your problem.

Of course you can’t create an HTML link to some random file in (a random subdirectory of) the instiki directory. That would be stupid and dangerous.

As you can see from URLs for the CSS and javascript files on your Instiki pages, you can link to files in the public directory. You can also link to files in the webs directory (as you can see from the file links that you created).

I guess also a functionality thing I noticed is that if you click on the hyperlink to an local hosted html page. Instiki calls up a download box within the browser and asks the user if they want to save the html file locally, instead of actually opening the page within the browser as an actual webpage. Is this an issue or just how instiki displays local html files?

That’s for security.

You ought to be able to trust that the content of an Instiki page is safe. Thus (for instance) you can’t edit an Instiki page and add malicious javascript to it. This protection would be vitiated, if you could put the malicious javascript in an HTML file that opened in the user’s browser as if it were just another page on the Instiki wiki.

This restriction does not apply to files in the public directory. Those had to have been placed there by the system administrator and are assumed to be safe.

Forums Instiki