Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
mediawiki-title
Advanced tools
Mediawiki title normalizetion, that conforms to the normalization rules used in MediaWiki Core. In general, the page title is converted to the mediawiki DB key format by trimming spaces, replacing whitespace symbols to underscores and applying wiki-specific capitalizetion rules. The namespace name is converted to a localized canonical name.
Creates an instance of title normalizer.
Param | Type | Description |
---|---|---|
options | Object | the normalizer options |
options.apiURI | function | a function that takes a domain string and returns back an API URI that needs to be contacted to get the site information used for normalization. |
P.<string>
Normalize a title according to the rules of
Kind: instance method of Normalizer
Returns: P.<string>
- normalized version of a title.
Access: public
Param | Type | Description |
---|---|---|
title | string | the page title to normalize. |
domain | string | the domain page belongs to. |
The library returns a Bluebird promise of a normalized title.
Wiki-specific rules are fetched from the api, and
cached within the Normalizer
instance, so reusing the instance is highly recommended.
var normalizer = new Normalizer({
apiURI: function(domain) { return 'https://' + domain + '/w/api.php'; }
});
normalizer.normalize(title, 'en.wikipedia.org')
.then(function(normalizedTitle) {
console.log(normalizedTitle);
})
.catch(function(e) {
console.log('The title is ivalid! ' + e.message);
});
For bug reporting please use Phabricator ]
and mark the bugs with Servises
label or contuct directly in IRC in the #wikimedia-services channel.
FAQs
Title normalization library for mediawiki
The npm package mediawiki-title receives a total of 5,926 weekly downloads. As such, mediawiki-title popularity was classified as popular.
We found that mediawiki-title demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.