Difference: ExitPlugin (1 vs. 2)

Revision 22020-05-29 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="TWikiPreferences"

ExitPlugin

Revision 12020-05-29 - TWikiAdminUser

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="TWikiPreferences"

ExitPlugin

<--
   Contributions to this TWiki plugin are appreciated. Please update the plugin page at
   http://twiki.org/cgi-bin/view/Plugins/ExitPlugin or provide feedback at
   http://twiki.org/cgi-bin/view/Plugins/ExitPluginDev.
   If you are a TWiki contributor please update the plugin in the SVN repository.
-->
Redirect links to external sites via a page of your choice, such as to remove topic names from HTTP referrer headers

Introduction

This plugin redirects links to external sites via a page of your choice. You might want to do that to display a disclaimer ("You are leaving TWiki, come back soon.") or to remove topic names from HTTP referrer headers.

Syntax Rules

This plugin does not extend TWiki markup syntax.

Examples

If ExitPlugin is installed, the following link should take you to https://wiki.epap.nms.kcl.ac.uk/do/exit.cgi?url=http://www.google.com/

http://www.google.com/

Note that these links will not be affected if the NOEXIT setting lists twiki.org.

http://twiki.org/download.html

http://develop.twiki.org/

Known Issues

Cross linked images

Cross linked images (like the following) are not handled by this plugin and can still leak page names via HTTP referer headers.

<img src="http://www.example.com/logo.png" alt="Someone else's logo"/>

As images are loaded with the page (unlike links) no user action is needed to leak page names.

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %INTERWIKIPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Redirect links to external sites via a page of your choice, such as to remove topic names from HTTP referrer headers

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

  • Disable exit page - sitewide (here), per web (in WebPreferences) or per topic
    • Set DISABLEEXITPLUGIN = 0

  • URI schemes to be redirected
    • Set SCHEMES = http https

  • Hosts for which no exit page should be shown.
    • Set NOEXIT = .bygrave.me.uk .ibygrave.no-ip.org

  • External link marks (you can use an image if you want). These are optional.
    • Set PREMARK =
    • Set POSTMARK =
    • #Set POSTMARK =  
    • Set MARKSINLINK = off

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip ExitPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/ExitPlugin.txt Plugin topic
    data/TWiki/ExitPlugin.txt,v Plugin topic repository
    lib/TWiki/Plugins/ExitPlugin.pm Plugin Perl module
    bin/exit.cgi CGI script to generate the redirction page
  • Visit configure in your TWiki installation, and enable the plugin in the {Plugins} section.
  • Test if the installation was successful:
    • Click on links in above examples, and check that they are redirected via https://wiki.epap.nms.kcl.ac.uk/do/exit.cgi?url=
    • Check that internal links do not redirect. Fix the setting of NOEXIT if they do.

Plugin Info

Plugin Author: TWiki:Main.IanBygrave
Copyright: © 2006-2009 TWiki:Main.IanBygrave
© 2006-2010 TWiki:TWiki.TWikiContributor
Plugin Version: 2010-12-12 (V1.6)
Change History:
<-- versions below in reverse order -->
 
2010-12-12: TWikibug:Item6530: Doc improvements, changing TWIKIWEB to SYSTEMWEB -- TWiki:Main.PeterThoeny
13 Jan 2009: Remove tags from the url.
08 Jan 2007: New DISABLEEXITPLUGIN preference to allow per-web or -topic disabling of the plugin. Stop using deprecated handler.
21 Jul 2006: Make the set of redirectable URI schemes configurable with SCHEMES preference.
26 Mar 2006: Performance improvements.
24 Mar 2006: Add MARKSINLINK pref. Match more links.
22 Mar 2006: Add TWiki:Plugins.ExternalLinkPlugin functionality to ExitPlugin.
13 Feb 2006: Fix url escaping, which got removed by a previous change.
11 Feb 2006: The NOEXIT configuration parameter is now a whitespace seperated list of internal domains.
04 Feb 2006: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.024
CPAN Dependencies: CGI
URI::Escape
Other Dependencies: none
Perl Version: 5.005
License: GPL (GNU General Public License)
Benchmarks: GoodStyle 95%, FormattedSearch 96%, ExitPlugin 95%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/ExitPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/ExitPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/ExitPluginAppraisal

Related Topics: TWikiPreferences, TWikiPlugins

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.ExitPlugin.