parser: Don't crash on links to invalid titles

Bug: T251045
Change-Id: I1a7b8b9b34d38ec4e3edc12687bdf99bb0e61bd8
This commit is contained in:
Bartosz Dziewoński 2020-04-27 19:59:26 +02:00
parent 0c098b1fab
commit 4ad9aa8449

View file

@ -502,6 +502,9 @@ function findSignature( timestampNode, until ) {
return false;
}
mwTitle = mw.Title.newFromText( title );
if ( !mwTitle ) {
return false;
}
if (
mwTitle.getNamespaceId() === mw.config.get( 'wgNamespaceIds' ).user ||
mwTitle.getNamespaceId() === mw.config.get( 'wgNamespaceIds' ).user_talk