Extension:SourceProtection
Patches or third-party extensions claiming to provide access control, when in use with MediaWiki, may not work in all cases, potentially exposing confidential data. Use them at your own risk. Neither the MediaWiki developers nor the Wikimedia Foundation are responsible for any data leaks that may result. This message is added to all extensions of this nature and may not reflect the actual security status of this extension.
For more information, see Security issues with authorization extensions .Release status: stable |
|
---|---|
Implementation | User rights |
Description | Removes the ability to view the source code of a page if a user does not have edit rights. |
Author(s) | Sen-Sai talk |
Latest version | 1.1.3 (2023年06月09日) |
Compatibility policy | For every MediaWiki release that is a Long Term Support release there is a corresponding branch in the extension. |
MediaWiki | 1.35.+;1.39+ |
PHP | 5.4+ - 8.1 |
Database changes | No |
License | GNU General Public License 2.0 or later |
Download | GitHub: Note: |
The SourceProtection extension removes the ability to view the source code of a page if a user does not have edit rights through disabling certain actions.
The following actions are disabled which may provide access to the source code:
- edit
- move
- history
- info
- raw
- delete
- revert
- revisiondelete
- rollback
- markpatrolled
Additionally, the SourceProtection extension removes the following tabs from a page if a user may not edit:
- View source
- History
- Edit with form (if Page Forms is installed)
Installation
[edit ]- Download and place the file(s) in a directory called
SourceProtection
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'SourceProtection' );
- Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Version history
[edit ]- Version 1.1.3 (2023年06月09日)
MW 1.39+ support
- Version 1.1.2 (2021年05月13日)
Checked compatibility with 1.35+. No major changes, just typos or comments added
- Version 1.1.1 (2017年10月10日)
Added more actions for user without edit permissions to protect the source of a page more thoroughly.
- Version 1.1.0 (2017年08月08日)
Removes View Source tab and (if Page Forms is installed the edit-Form tab) & History tab from menu and disables action=edit function for users with no edit permissions. It will also block the viewing of the readonly form.
- Version 1.0
Initial version (prototype)
See also
[edit ]- Page specific user rights extensions
- Stable extensions
- User rights extensions
- GPL licensed extensions
- Extensions in GitHub version control
- EditPage::showReadOnlyForm:initial extensions
- GetUserPermissionsErrors extensions
- SkinTemplateNavigation::Universal extensions
- All extensions
- Extensions by Wikibase Solutions