mediawiki | A JavaScript framework for the MediaWiki API

 by   oliver-moran JavaScript Version: Current License: GPL-3.0

kandi X-RAY | mediawiki Summary

kandi X-RAY | mediawiki Summary

mediawiki is a JavaScript library. mediawiki has no bugs, it has a Strong Copyleft License and it has low support. However mediawiki has 18 vulnerabilities. You can download it from GitHub.

A JavaScript framework for the MediaWiki API.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              mediawiki has a low active ecosystem.
              It has 31 star(s) with 18 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 5 open issues and 1 have been closed. On average issues are closed in 40 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of mediawiki is current.

            kandi-Quality Quality

              mediawiki has 0 bugs and 0 code smells.

            kandi-Security Security

              OutlinedDot
              mediawiki has 18 vulnerability issues reported (0 critical, 5 high, 12 medium, 1 low).
              mediawiki code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              mediawiki is licensed under the GPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              mediawiki releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.
              mediawiki saves you 6 person hours of effort in developing the same functionality from scratch.
              It has 20 lines of code, 0 functions and 3 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed mediawiki and discovered the below as its top functions. This is intended to give you an instant insight into mediawiki implemented functionality, and help decide if they suit your requirements.
            • Edit a page .
            • Generic request method
            • Queries a page of revision .
            • Make an XHR request .
            • Process the request queue
            • Constructor for the bot .
            • Process the response
            • Add a request to the queue .
            • Serialize an object
            • Creates a request .
            Get all kandi verified functions for this library.

            mediawiki Key Features

            No Key Features are available at this moment for mediawiki.

            mediawiki Examples and Code Snippets

            No Code Snippets are available at this moment for mediawiki.

            Community Discussions

            QUESTION

            Where does the inconsistency in behaviour of Mediawiki templates come from?
            Asked 2022-Apr-03 at 19:27

            This question pertains to the inconsistent behaviour of Mediawiki syntax and its templates and parser functions.

            When placed directly in a wiki page, both these snippets work as expected:

            ...

            ANSWER

            Answered 2022-Apr-03 at 19:27

            Your sample template does not return an empty string when the page has sub pages. It returns for which {{#if:|yes|no}} properly returns yes.

            If you remove the , you'll get the behavior you want.

            Source https://stackoverflow.com/questions/71721837

            QUESTION

            Extract Wikipedia Data From XML Data dumps
            Asked 2021-Dec-11 at 17:13

            I have been trying to extract the text from some Wikipedia dumps. I need to get the text from the id, title, ns, timestamp, username, ip, and text tags in the full-history English Wikipedia dump.

            I read and modified the code from https://www.heatonresearch.com/2017/03/03/python-basic-wikipedia-parsing.html.

            I was able to write the code below:

            ...

            ANSWER

            Answered 2021-Dec-11 at 17:13

            Simplify the attempted script to the bare minimum you need such as removing the timings. The process here is using iterparse usually for very large XML files to iteratively parse tag by tag wherever the tag resides in document so either as root, parent, child, descendant, etc.

            Therefore, clean up the logic tag by tag and then on last needed tag, write row to csv with current assigned variables which are reset on every tag.

            Source https://stackoverflow.com/questions/70291272

            QUESTION

            Mediawiki redirect from old URL path starting with /w/ to new path without it
            Asked 2021-Nov-28 at 21:48

            I have old URL path for all pages

            ...

            ANSWER

            Answered 2021-Nov-28 at 21:48

            You need to add a RewriteRule to do the redirect before the other rules:

            Source https://stackoverflow.com/questions/70119391

            QUESTION

            Accessing content of a page before and after edit in a MediaWiki extension
            Asked 2021-Nov-17 at 20:03

            I'm trying to create a MediaWiki extension that would compare content of a page before and after saving an edit. I figured out MultiContentSave hook would be the proper one to use. Inside I can get edited page content using following code:

            ...

            ANSWER

            Answered 2021-Nov-17 at 20:03

            Try something like this :

            Source https://stackoverflow.com/questions/70009987

            QUESTION

            What it takes to edit wikidata from my web application?
            Asked 2021-Oct-31 at 16:11

            I am developing a web application which shows basic information about basketball players. I get all the data from wikidata by basic sparql queries. However, some players are missing some basic information(height, weight, their current team, etc.). And I would like to allow users of my web app to edit/add missing information on my app and I would send the edit request to wikidata. How it can be done ? I found Wikibase/API where is written that "The Wikibase API allows querying, adding, removing and editing information on Wikidata or any other Wikibase instance." https://www.mediawiki.org/wiki/Wikibase/API

            But I could not find anywhere at least something about how to edit/add data or some example post request how it works(I'm pretty sure it is there, but maybe I'm just blind...). If someone has any experience with this, I would appreciate any help of where to look and what to read. Thanks

            ...

            ANSWER

            Answered 2021-Oct-31 at 16:11

            This is the API documentation. It’s sort-of abusing the regular mediawiki API and I find it highly annoying.

            An easier option right now is probably Quickstatements, which is used for many semi-automated data imports. It’s usually run by submitting batches as text files on its web frontend, but here are instructions how it can be used as an API. Beware, however, that any shenanigans your users get into would fall back on you.

            Quickstatements is OSS, so you could check out how it uses the API and replicate the functionality. That would allow you to use your users‘ accounts via OAuth, as well.

            Finally, there is a new REST API that’s getting close to seeing a release, and it appears to shape up as exactly the sort of straightforward API that’s been missing so far.

            Source https://stackoverflow.com/questions/69698537

            QUESTION

            Suppress warnings in mediawiki
            Asked 2021-Aug-24 at 14:17

            Is there any way to suppress deprication warnings in mediawiki? For e.g. I am getting this message at the top of some of the pages on my personal wiki site.

            ...

            ANSWER

            Answered 2021-Aug-24 at 14:17

            At the bottom of LocalSettings.php:

            Source https://stackoverflow.com/questions/68902143

            QUESTION

            Converting code listings from mediawiki to latex using pandoc
            Asked 2021-Jul-06 at 06:39

            Is there an easy way to say pandoc converter I wish to replace all my source codes in mediawiki article convert to an lstlisting environment on its Latex output?

            At this moment, all my some code... environments are converted into something like this

            ...

            ANSWER

            Answered 2021-Jul-06 at 06:39

            Solution was very simple. There is a --listings command line option solving this problem as Sam Carter pointed out.

            Source https://stackoverflow.com/questions/68258507

            QUESTION

            Class Wikibase\DataModel\Entity\ItemId not found WikiBase installation
            Asked 2021-Jun-03 at 08:55

            I am currently trying to follow this tutorial: https://www.mediawiki.org/wiki/Wikibase/Installation

            I have the latest version of both MediaWiki and WikiBase (1.35) I'm currently trying to run the maintenance scripts. I have installed both Wikibase Repository and Wikibase Client.

            When I try to run "php maintenance/update.php" it gives me this error:

            ...

            ANSWER

            Answered 2021-Jun-03 at 08:55

            I hit the same error, and in my case, it was because my compose.local.json, (copied from composer.local.json-sample,) was pointing to "extensions/example/composer.json" rather than "extensions/Wikibase/composer.json". Fixing this to Wikibase, deleting composer.lock, running composer install --no-dev again, and finally running update.php fixed the issue.

            Source https://stackoverflow.com/questions/67236687

            QUESTION

            Fedora 34: Pasting multiple commands into a bash terminal behavior change
            Asked 2021-May-26 at 13:42

            I use Mediawiki to store all the commands I need to do to rebuild my system from scratch when a Fedora upgrade is available.

            Until now, I would simply copy/paste a huge set of commands into a terminal window and let it run free.

            I am trying to upgrade my Fedora 32 to 34 and this no longer works. When anything in my script enters a CLI - like mysql or even a new bash shell, execution stops until I type 'exit'. Then, the SQL commands or whatever are executed in bash and makes an ugly display.

            Here is the most simplified example of this that I could create. This works fine in Fedora 32 but gets stuck in Fedora 34:

            ...

            ANSWER

            Answered 2021-May-26 at 13:42

            I can confirm this in Fedora 34 / GNU bash, version 5.1.0(1)-release (x86_64-redhat-linux-gnu.

            This is a new feature in the underlying readline library and the feature is enabled by default. Currently, the only way to turn it off is to edit your ~/.inputrc and add the line:

            Source https://stackoverflow.com/questions/67674633

            QUESTION

            regex to match the closing tags by ignoring inner tags
            Asked 2021-May-19 at 19:12

            I want to capture the image tag of MediaWiki format, e.g,

            [[ Image:Justus Sustermans - Portrait of Galileo Galilei (Uffizi).jpg|left|thumb|upright|[[Galileo]] is often referred to as the Father of [[modern astronomy]], portrait by [[Justus Sustermans]]]]

            I have to ignore the inner [[...]] to match the whole (shown by bold [[ and ]]). I came up with

            ...

            ANSWER

            Answered 2021-May-19 at 19:12

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            In MediaWiki before 1.35.1, the combination of Html::rawElement and Message::text leads to XSS because the definition of MediaWiki:recentchanges-legend-watchlistexpiry can be changed onwiki so that the output is raw HTML.
            The API in the Push extension for MediaWiki through 1.35 used cleartext for ApiPush credentials, allowing for potential information disclosure.
            The API in the Push extension for MediaWiki through 1.35 did not require an edit token in ApiPushBase.php and therefore facilitated a CSRF attack.
            An issue was discovered in MediaWiki before 1.35.1. Missing users (accounts that don't exist) and hidden users (accounts that have been explicitly hidden due to being abusive, or similar) that the viewer cannot see are handled differently, exposing sensitive information about the hidden status to unprivileged viewers. This exists on various code paths.
            MediaWiki before 1.35.1 allows XSS via BlockLogFormatter.php. Language::translateBlockExpiry itself does not escape in all code paths. For example, the return of Language::userTimeAndDate is is always unsafe for HTML in a month value. This affects MediaWiki 1.12.0 and later.
            MediaWiki before 1.35.1 allows XSS via BlockLogFormatter.php. MediaWiki:blanknamespace potentially can be output as raw HTML with SCRIPT tags via LogFormatter::makePageLink(). This affects MediaWiki 1.33.0 and later.
            MediaWiki before 1.35.1 blocks legitimate attempts to hide log entries in some situations. If one sets MediaWiki:Mainpage to Special:MyLanguage/Main Page, visits a log entry on Special:Log, and toggles the "Change visibility of selected log entries" checkbox (or a tags checkbox) next to it, there is a redirection to the main page's action=historysubmit (instead of the desired behavior in which a revision-deletion form appears).
            In MediaWiki before 1.35.1, the messages userrights-expiry-current and userrights-expiry-none can contain raw HTML. XSS can happen when a user visits Special:UserRights but does not have rights to change all userrights, and the table on the left side has unchangeable groups in it. (The right column with the changeable groups is not affected and is escaped correctly.)
            An issue was discovered in the CasAuth extension for MediaWiki through 1.35.1. Due to improper username validation, it allowed user impersonation with trivial manipulations of certain characters within a given username. An ordinary user may be able to login as a "bureaucrat user" who has a similar username, as demonstrated by usernames that differ only in (1) bidirectional override symbols or (2) blank space.
            An issue was discovered in the Widgets extension for MediaWiki through 1.35.1. Any user with the ability to edit pages within the Widgets namespace could call any static function within any class (defined within PHP or MediaWiki) via a crafted HTML comment, related to a Smarty template. For example, a person in the Widget Editors group could use \MediaWiki\Shell\Shell::command within a comment.
            An issue was discovered in the SecurePoll extension for MediaWiki through 1.35.1. The non-admin vote list contains a full vote timestamp, which may provide unintended clues about how a voting process unfolded.
            An issue was discovered in the GlobalUsage extension for MediaWiki through 1.35.1. SpecialGlobalUsage.php calls WikiMap::makeForeignLink unsafely. The $page variable within the formatItem function was not being properly escaped, allowing for XSS under certain conditions.
            An issue was discovered in the PushToWatch extension for MediaWiki through 1.35.1. The primary form did not implement an anti-CSRF token and therefore was completely vulnerable to CSRF attacks against onSkinAddFooterLinks in PushToWatch.php.
            An issue was discovered in the FileImporter extension for MediaWiki before 1.34.4. An attacker can import a file even when the target page is protected against "page creation" and the attacker should not be able to create it. This occurs because of a mishandled distinction between an upload restriction and a create restriction. An attacker cannot leverage this to overwrite anything, but can leverage this to force a wiki to have a page with a disallowed title.
            XSS exists in the MobileFrontend extension for MediaWiki before 1.34.4 because section.line is mishandled during regex section line replacement from PageGateway. Using crafted HTML, an attacker can elicit an XSS attack via jQuery's parseHTML method, which can cause image callbacks to fire even without the element being appended to the DOM.
            An issue was discovered in MediaWiki before 1.31.10 and 1.32.x through 1.34.x before 1.34.4. The non-jqueryMsg version of mw.message().parse() doesn't escape HTML. This affects both message contents (which are generally safe) and the parameters (which can be based on user input). (When jqueryMsg is loaded, it correctly accepts only whitelisted tags in message contents, and escapes all parameters. Situations with an unloaded jqueryMsg are rare in practice, but can for example occur for Special:SpecialPages on a wiki with no extensions installed.)
            An issue was discovered in the OATHAuth extension in MediaWiki before 1.31.10 and 1.32.x through 1.34.x before 1.34.4. For Wikis using OATHAuth on a farm/cluster (such as via CentralAuth), rate limiting of OATH tokens is only done on a single site level. Thus, multiple requests can be made across many wikis/sites concurrently.

            Install mediawiki

            Install on Node.js using:.

            Support

            The module is written so as to be also executable as a JavaScript library in a web browser. However, your are likely to encounter cross-domain security issues if the library is executed in a web browser from a different domain to the target MediaWiki installation. See included example (examples/browser.html) for sample use in a web-browser.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/oliver-moran/mediawiki.git

          • CLI

            gh repo clone oliver-moran/mediawiki

          • sshUrl

            git@github.com:oliver-moran/mediawiki.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular JavaScript Libraries

            freeCodeCamp

            by freeCodeCamp

            vue

            by vuejs

            react

            by facebook

            bootstrap

            by twbs

            Try Top Libraries by oliver-moran

            jimp

            by oliver-moranJavaScript

            php-proxy

            by oliver-moranPHP

            animate.css.js

            by oliver-moranJavaScript

            json-rpc

            by oliver-moranJavaScript

            jimp-cli

            by oliver-moranJavaScript