Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1212647?usp=email )
Change subject: cleanup: Remove deprecated GeneratorsMixin.alllinks, keep RST docs
......................................................................
cleanup: Remove deprecated GeneratorsMixin.alllinks, keep RST docs
- The GeneratorsMixin.alllink method was deprecated in Pywikibot 10.7
and removed in Pywikibot 11 because it was dysfunctional
- Added a manual RST entry under GeneratorsMixin to preserve historical API
documentation due to the short deprecation time
Bug: T407708
Change-Id: Ib1c01744758148c1f09e42b3c2a2fbf0ebb2f051
---
M ROADMAP.rst
M docs/api_ref/pywikibot.site.rst
M pywikibot/site/_generators.py
3 files changed, 54 insertions(+), 108 deletions(-)
Approvals:
Xqt: Verified; Looks good to me, approved
diff --git a/ROADMAP.rst b/ROADMAP.rst
index b247c7d..2fbbe04 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -3,6 +3,7 @@
**Improvements**
+* Provide a security policy with Pywikibot (:phab:`T410753`)
* Show a friendly install message with :mod:`pwb<pywikibot.scripts.wrapper>` wrapper
when mandatory packages are missing (:phab:`T409662`)
* Update `tools._unidata.__category_cf` dict for :func:`tools.chars.contains_invisible` and
@@ -17,6 +18,9 @@
**Code cleanups**
+* Dysfunctional :meth:`APISite.alllinks()
+ <pywikibot.site._generators.GeneratorsMixin.alllinks>` was removed.
+ (:phab:`T359427`, :phab:`T407708`)
* The inheritance of the :exc:`exceptions.NoSiteLinkError` exception from
:exc:`exceptions.NoPageError` was removed
* The *dropdelay* and *releasepid* attributes of the :class:`throttle.Throttle` class was
@@ -84,14 +88,6 @@
removed in in the third subsequent major release, remaining available for the two releases in between.
-Pending removal in Pywikibot 11
--------------------------------
-
-* 10.7.0: Dysfunctional :meth:`APISite.alllinks()
- <pywikibot.site._generators.GeneratorsMixin.alllinks>` will be removed.
- (:phab:`T359427`, :phab:`T407708`)
-
-
Pending removal in Pywikibot 12
-------------------------------
diff --git a/docs/api_ref/pywikibot.site.rst b/docs/api_ref/pywikibot.site.rst
index 220a568..6fe32e4 100644
--- a/docs/api_ref/pywikibot.site.rst
+++ b/docs/api_ref/pywikibot.site.rst
@@ -86,6 +86,55 @@
.. automodule:: pywikibot.site._generators
:synopsis: Objects representing API generators to MediaWiki site
+.. currentmodule:: pywikibot.site._generators
+
+.. method:: GeneratorsMixin.alllinks(start='', prefix='', namespace=0, unique=False, fromids=False, total=None)
+
+ Iterate all links to pages (which need not exist) in one namespace.
+
+ .. note::
+ In practice, links that were found on pages that have
+ been deleted may not have been removed from the links table,
+ so this method can return false positives.
+
+ .. caution::
+ *unique* parameter is no longer supported by
+ MediaWiki 1.43 or higher. Pywikibot uses
+ :func:`tools.itertools.filter_unique` in that case which
+ might be memory intensive. Use it with care.
+
+ .. important::
+ Using *namespace* option different from ``0``
+ needs a lot of time on Wikidata site.
+
+ .. deprecated:: 10.7
+ This method is dysfunctional and should no longer be used. It
+ will be removed in Pywikibot 11.
+
+ .. versionremoved:: 11.0
+ This method was dysfunctional and removed, see the following tickets for details:
+ :phab:`T359427`, :phab:`T364617` and :phab:`T407708`
+
+ .. seealso::
+ - :api:`Alllinks`
+ - :meth:`pagebacklinks`
+ - :meth:`pagelinks`
+
+ :param start: Start at this title (page need not exist).
+ :param prefix: Only yield pages starting with this string.
+ :param namespace: Iterate pages from this (single) namespace
+ :param unique: If True, only iterate each link title once
+ (default: False)
+ :param fromids: if True, include the pageid of the page
+ containing each link (default: False) as the '_fromid'
+ attribute of the Page; cannot be combined with *unique*
+ :param total: Limit the total number of items
+ :raises KeyError: the *namespace* identifier was not resolved
+ :raises TypeError: the *namespace* identifier has an
+ inappropriate type such as bool, or an iterable with more
+ than one namespace
+ :rtype: Generator[pywikibot.Page]
+
:mod:`DataSite<pywikibot.site.\_datasite>` --- API Interface for Wikibase
=========================================================================
diff --git a/pywikibot/site/_generators.py b/pywikibot/site/_generators.py
index e62ff66..8b15ad1 100644
--- a/pywikibot/site/_generators.py
+++ b/pywikibot/site/_generators.py
@@ -27,12 +27,7 @@
)
from pywikibot.site._decorators import need_right
from pywikibot.site._namespace import NamespaceArgType
-from pywikibot.tools import (
- deprecate_arg,
- deprecated,
- deprecated_signature,
- is_ip_address,
-)
+from pywikibot.tools import deprecate_arg, deprecated_signature, is_ip_address
from pywikibot.tools.itertools import filter_unique
@@ -1013,100 +1008,6 @@
return apgen
- @deprecated(since='10.7.0')
- def alllinks(
- self,
- start: str = '',
- prefix: str = '',
- namespace: SingleNamespaceType = 0,
- unique: bool = False,
- fromids: bool = False,
- total: int | None = None,
- ) -> Generator[pywikibot.Page]:
- """Iterate all links to pages (which need not exist) in one namespace.
-
- .. note:: In practice, links that were found on pages that have
- been deleted may not have been removed from the links table,
- so this method can return false positives.
-
- .. caution:: *unique* parameter is no longer supported by
- MediaWiki 1.43 or higher. Pywikibot uses
- :func:`tools.itertools.filter_unique` in that case which
- might be memory intensive. Use it with care.
-
- .. important:: Using *namespace* option different from ``0``
- needs a lot of time on Wikidata site. You have to increase
- the **read** timeout part of ``socket_timeout`` in
- :ref:`Http Settings` in your ``user-config.py`` file. Or
- increase it partially within your code like:
-
- .. code-block:: python
-
- from pywikibot import config
- save_timeout = config.socket_timeout # save the timeout config
- config.socket_timeout = save_timeout[0], 60
- ... # your code here
- config.socket_timeout = save_timeout # restore timeout config
-
- The minimum read timeout value should be 60 seconds in that
- case.
-
- .. deprecated:: 10.7
- This method is dysfunctional and should no longer be used. It
- will probably be removed in Pywikibot 11.
-
- .. seealso::
- - :api:`Alllinks`
- - :meth:`pagebacklinks`
- - :meth:`pagelinks`
-
- :param start: Start at this title (page need not exist).
- :param prefix: Only yield pages starting with this string.
- :param namespace: Iterate pages from this (single) namespace
- :param unique: If True, only iterate each link title once
- (default: False)
- :param fromids: if True, include the pageid of the page
- containing each link (default: False) as the '_fromid'
- attribute of the Page; cannot be combined with *unique*
- :raises KeyError: the *namespace* identifier was not resolved
- :raises TypeError: the *namespace* identifier has an
- inappropriate type such as bool, or an iterable with more
- than one namespace
- """
- # no cover: start
- if unique and fromids:
- raise Error('alllinks: unique and fromids cannot both be True.')
- algen = self._generator(api.ListGenerator, type_arg='alllinks',
- namespaces=namespace, total=total)
- if fromids:
- algen.request['alprop'] = 'title|ids'
-
- # circumvent problems with unique and prefix due to T359425 and T359427
- if self.mw_version < '1.43':
- if prefix:
- algen.request['alprefix'] = prefix
- prefix = '' # don't break the loop later
- if start:
- algen.request['alfrom'] = start
- algen.request['alunique'] = unique
- else:
- if prefix:
- algen.request['alfrom'] = prefix
- elif start:
- algen.request['alfrom'] = start
- if unique:
- algen = filter_unique(
- algen, key=lambda link: (link['title'], link['ns']))
-
- for link in algen:
- p = pywikibot.Page(self, link['title'], link['ns'])
- if prefix and p.title() > prefix: # T359425, T359427
- break
- if fromids:
- p._fromid = link['fromid'] # type: ignore[attr-defined]
- yield p
- # no cover: stop
-
def allcategories(
self,
start: str = '!',
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1212647?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ib1c01744758148c1f09e42b3c2a2fbf0ebb2f051
Gerrit-Change-Number: 1212647
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1210674?usp=email )
Change subject: doc: Provide security policy with Pywikibot repository
......................................................................
doc: Provide security policy with Pywikibot repository
Vulnerability reported by Aydinnyunus in T410755.
Bug: T410753
Change-Id: I315eb4d03a162b64b17bd99693760f11fff213dd
---
A docs/SECURITY.rst
A docs/codeofconduct.rst
M docs/index.rst
3 files changed, 32 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/SECURITY.rst b/docs/SECURITY.rst
new file mode 100644
index 0000000..221ba18
--- /dev/null
+++ b/docs/SECURITY.rst
@@ -0,0 +1,29 @@
+*************************
+Pywikibot Security Policy
+*************************
+
+Reporting a Vulnerability
+=========================
+To report a security vulnerability in Pywikibot, please contact the maintainers via `Phabricator
+task <https://phabricator.wikimedia.org/maniphest/task/edit/form/75/>`_ or via email at
+**security(a)pywikibot.org**. We will acknowledge receipt of your report within 2 business days
+and aim to provide a resolution within 30 days, depending on the severity of the issue.
+
+Security Updates
+================
+Pywikibot supports security updates for the latest stable release. Older versions may not receive
+security updates. Security updates will be made available through PyPI, the nightlies dump, the
+gerrit repository and the GitHub mirror. Users are advised to upgrade to the latest version to
+mitigate potential vulnerabilities.
+
+Disclosure Policy
+=================
+We follow a responsible disclosure process. After a vulnerability is fixed, we will publish a
+security advisory detailing the issue and the steps taken to resolve it. The advisory will be
+available on the GitHub repository and communicated to users through the mailing list.
+
+Security Resources
+==================
+- GitHub Security Advisories: https://docs.github.com/en/github/managing-security-vulnerabilities/creatin…
+- PyPI Security: https://pypi.org/security/
+- MediaWiki Security for Developers: https://www.mediawiki.org/wiki/Security_for_developers
diff --git a/docs/codeofconduct.rst b/docs/codeofconduct.rst
new file mode 100644
index 0000000..96e0ba2
--- /dev/null
+++ b/docs/codeofconduct.rst
@@ -0,0 +1 @@
+.. include:: ../CODE_OF_CONDUCT.rst
diff --git a/docs/index.rst b/docs/index.rst
index f1c0712..9083e42 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -55,7 +55,7 @@
global_options
faq
getting_help
-
+ SECURITY
.. toctree::
:maxdepth: 1
@@ -75,6 +75,7 @@
scripts_ref/index
utilities/install
tests_ref/index
+ codeofconduct
.. toctree::
:maxdepth: 1
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1210674?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I315eb4d03a162b64b17bd99693760f11fff213dd
Gerrit-Change-Number: 1210674
Gerrit-PatchSet: 4
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: JJMC89 <JJMC89.Wikimedia(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <Ladsgroup(a)gmail.com>
Gerrit-Reviewer: Reedy <reedy(a)wikimedia.org>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-CC: SBassett <sbassett(a)wikimedia.org>
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1210633?usp=email )
Change subject: [10.7.1] Publish 10.7.1 stable release
......................................................................
[10.7.1] Publish 10.7.1 stable release
Change-Id: I57f35e6f77c63c1dd43f07f6bdf4383d637a2b5f
---
M HISTORY.rst
M ROADMAP.rst
M pywikibot/__metadata__.py
M pywikibot/_wbtypes.py
4 files changed, 24 insertions(+), 14 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/HISTORY.rst b/HISTORY.rst
index 23feeed..ce530c7 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,6 +1,22 @@
Release History
===============
+10.7.0
+------
+*31 October 2025*
+
+* Add support for pcmwikiquote and minwikisource. (:phab:`T408345`, :phab:`T408353`)
+* Deprecate dysfunctional :meth:`APISite.alllinks()
+ <pywikibot.site._generators.GeneratorsMixin.alllinks>`. (:phab:`T359427`, :phab:`T407708`)
+* Refactor ``replace_magicwords`` in
+ :meth:`cosmetic_changes.CosmeticChangesToolkit.translateMagicWords`. (:phab:`T396715`)
+* Deprecate old ``(type, value, traceback)`` signature in
+ :meth:`tools.collections.GeneratorWrapper.throw`. (:phab:`T340641`)
+* Replace default timetravel.mementoweb.org with web.archive.org in :mod:`data.memento` module.
+ (:phab:`T400570`, :phab:`T407694`)
+* i18n updates
+
+
10.6.0
------
*23 October 2025*
diff --git a/ROADMAP.rst b/ROADMAP.rst
index 8e546d9..abd6a0a 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -1,15 +1,9 @@
Current Release Changes
=======================
-* Add support for pcmwikiquote and minwikisource. (:phab:`T408345`, :phab:`T408353`)
-* Deprecate dysfunctional :meth:`APISite.alllinks()
- <pywikibot.site._generators.GeneratorsMixin.alllinks>`. (:phab:`T359427`, :phab:`T407708`)
-* Refactor ``replace_magicwords`` in
- :meth:`cosmetic_changes.CosmeticChangesToolkit.translateMagicWords`. (:phab:`T396715`)
-* Deprecate old ``(type, value, traceback)`` signature in
- :meth:`tools.collections.GeneratorWrapper.throw`. (:phab:`T340641`)
-* Replace default timetravel.mementoweb.org with web.archive.org in :mod:`data.memento` module.
- (:phab:`T400570`, :phab:`T407694`)
+* Fix vulnerability in password parsing (:phab:`T410753`)
+* Import ``typing.cast`` in :mod:`_wbtypes` module to prevent ``NameError`` in
+ :class:`pywikibot.WbTime`
* i18n updates
@@ -17,10 +11,10 @@
============
This section lists features, methods, parameters, or attributes that are deprecated
-and scheduled for removal in future Pywikibot releases.
+and scheduled for removal in future Pywikibot releases.
Deprecated items may still work in the current release but are no longer recommended for use.
-Users should update their code according to the recommended alternatives.
+Users should update their code according to the recommended alternatives.
Pywikibot follows a clear deprecation policy: features are typically deprecated in one release and
removed in in the third subsequent major release, remaining available for the two releases in between.
diff --git a/pywikibot/__metadata__.py b/pywikibot/__metadata__.py
index 53458c1..c99a2a3 100644
--- a/pywikibot/__metadata__.py
+++ b/pywikibot/__metadata__.py
@@ -12,6 +12,6 @@
from time import strftime
-__version__ = '10.7.0'
+__version__ = '10.7.1'
__url__ = 'https://www.mediawiki.org/wiki/Manual:Pywikibot'
__copyright__ = f'2003-{strftime("%Y")}, Pywikibot team'
diff --git a/pywikibot/_wbtypes.py b/pywikibot/_wbtypes.py
index 89dea48..1107dc7 100644
--- a/pywikibot/_wbtypes.py
+++ b/pywikibot/_wbtypes.py
@@ -14,7 +14,7 @@
from collections.abc import Mapping
from contextlib import suppress
from decimal import Decimal
-from typing import TYPE_CHECKING, Any
+from typing import TYPE_CHECKING, Any, cast
import pywikibot
from pywikibot import exceptions
@@ -28,7 +28,7 @@
if TYPE_CHECKING:
- from typing import Union, cast
+ from typing import Union
from pywikibot.site import APISite, BaseSite, DataSite
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1210633?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: stable
Gerrit-Change-Id: I57f35e6f77c63c1dd43f07f6bdf4383d637a2b5f
Gerrit-Change-Number: 1210633
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1210626?usp=email )
Change subject: SEC: parse password lines as literals & update default PASS_BASENAME
......................................................................
SEC: parse password lines as literals & update default PASS_BASENAME
- Replaced eval() with ast.literal_eval() to prevent remote code execution.
- Added sanity checks for line length and comma count.
- BotPassword objects are safely reconstructed after parsing.
- Raises ValueError for malformed password line instead passing silently
- Default PASS_BASENAME changed from 'user-password.py' to 'user-password.cfg'.
- Verified with unit test ensuring no code execution occurs from password file.
- Updated docstrings and versionchanged notices.
Patch backported from master
Bug: T410753
Change-Id: I685320ac3ea837023fc41278c48916786d546eff
---
M pywikibot/login.py
M pywikibot/scripts/generate_user_files.py
M tests/generate_user_files_tests.py
M tests/login_tests.py
4 files changed, 74 insertions(+), 11 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/pywikibot/login.py b/pywikibot/login.py
index 94650e9..e7eb88c 100644
--- a/pywikibot/login.py
+++ b/pywikibot/login.py
@@ -10,6 +10,7 @@
import os
import re
import webbrowser
+from ast import literal_eval
from enum import IntEnum
from pathlib import Path
from textwrap import fill
@@ -33,6 +34,8 @@
except ImportError as e:
mwoauth = e
+TEST_RUNNING = os.environ.get('PYWIKIBOT_TEST_RUNNING', '0') == '1'
+
class _PasswordFileWarning(UserWarning):
@@ -202,7 +205,7 @@
will be used, so default usernames should occur above specific
usernames.
- .. note:: For BotPasswords the password should be given as a
+ .. note:: For BotPasswords the password should be given like a
:class:`BotPassword` object.
The file must be either encoded in ASCII or UTF-8.
@@ -215,10 +218,17 @@
('my_username', BotPassword('my_suffix', 'my_password'))
.. versionchanged:: 10.2
- raises ValueError instead of AttributeError if password_file
- is not set
+ Raises ValueError instead of AttributeError if password_file
+ is not set.
+ .. versionchanged:: 10.7.1
+ Due to vulnerability issue the password lines are no longer
+ evaluated as Python source but parsed as literals.
+ Raises ValueError if an exception occurs while evaluating a
+ password line.
- :raises ValueError: `password_file` is not set in the user-config.py
+
+ :raises ValueError: `password_file` is not set in the
+ ``user-config.py`` or entries are critical malformed
:raises FileNotFoundError: password file does not exist
"""
if config.password_file is None:
@@ -247,15 +257,24 @@
lines = password_path.read_text('utf-8').splitlines()
line_len = len(lines)
-
for n, line in enumerate(reversed(lines)):
- if not line.strip() or line.startswith('#'):
+ line = line.strip()
+ if not line or line.startswith('#'):
continue
+ # sanity check
+ if (line.count(',') > 3 or len(line) > 250) and not TEST_RUNNING:
+ raise ValueError('Password line too long or too complex')
+
+ botpassword = 'BotPassword' in line
+ if botpassword:
+ line = line.replace('BotPassword', '')
+
try:
- entry = eval(line)
- except SyntaxError:
- entry = None
+ entry = literal_eval(line)
+ except Exception:
+ # catch the exceptions to not leak passwords to console or logs
+ raise ValueError('Invalid password line format') from None
if not isinstance(entry, tuple):
warn(f'Invalid tuple in line {line_len - n}',
@@ -268,6 +287,9 @@
_PasswordFileWarning, stacklevel=2)
continue
+ if botpassword:
+ entry = (entry[0], BotPassword(*entry[1]))
+
code, family, username, password = (
self.site.code, self.site.family.name)[:4 - entry_len] + entry
diff --git a/pywikibot/scripts/generate_user_files.py b/pywikibot/scripts/generate_user_files.py
index 1395768..e5663d96 100755
--- a/pywikibot/scripts/generate_user_files.py
+++ b/pywikibot/scripts/generate_user_files.py
@@ -6,6 +6,9 @@
.. versionchanged:: 8.0
let user the choice which section to be copied.
Also EXTERNAL EDITOR SETTINGS section can be copied.
+.. versionchanged:: 10.7.1
+ Default ``PASS_BASENAME`` was changed from ``user-password.py`` to
+ ``user-password.cfg``
"""
#
# (C) Pywikibot team, 2010-2025
@@ -55,7 +58,7 @@
console_encoding = 'iso-8859-1'
USER_BASENAME = 'user-config.py'
-PASS_BASENAME = 'user-password.py'
+PASS_BASENAME = 'user-password.cfg'
def change_base_dir():
diff --git a/tests/generate_user_files_tests.py b/tests/generate_user_files_tests.py
index 28b2575..609c108 100755
--- a/tests/generate_user_files_tests.py
+++ b/tests/generate_user_files_tests.py
@@ -30,7 +30,7 @@
def test_base_names(self) -> None:
"""Test basename constants."""
self.assertEndsWith(guf.USER_BASENAME, '.py')
- self.assertEndsWith(guf.PASS_BASENAME, '.py')
+ self.assertEndsWith(guf.PASS_BASENAME, '.cfg')
def test_config_test(self) -> None:
"""Test config text strings."""
diff --git a/tests/login_tests.py b/tests/login_tests.py
index 83ce47e..fa0ee65 100755
--- a/tests/login_tests.py
+++ b/tests/login_tests.py
@@ -10,6 +10,8 @@
#
from __future__ import annotations
+import builtins
+import uuid
from collections import defaultdict
from io import StringIO
from pathlib import Path
@@ -187,6 +189,42 @@
""", '~FakePassword')
self.assertEqual(obj.login_name, '~FakeUsername@~FakeSuffix')
+ def test_eval_security(self) -> None:
+ """Test security that password file does not use eval() function."""
+ # Test file will will be created for Python 3.10-3.13
+ # due to self.stat patch in setUp().
+ no_file = (3, 9) < PYTHON_VERSION < (3, 14)
+
+ builtins.exploit_value = False
+ exploit_code = (
+ "__import__('builtins').__dict__"
+ ".__setitem__('exploit_value', True)"
+ )
+ if not no_file:
+ exploit_filename = f'pwb_rce_{uuid.uuid4().hex[:8]}.txt'
+ exploit_file = Path(exploit_filename)
+ exploit_code = (
+ f"__import__('pathlib').Path('{exploit_filename}').touch() or "
+ + exploit_code
+ )
+
+ with self.subTest(test='Test ValueError'), \
+ self.assertRaisesRegex(ValueError,
+ 'Invalid password line format'):
+ self._test_pwfile(f"""
+ ('en', 'wikipedia', 'victim', {exploit_code})
+ """, None)
+
+ with self.subTest(test='Test value was modified'):
+ self.assertFalse(exploit_value) # noqa: F821
+
+ if not no_file:
+ with self.subTest(test='Test file exists'):
+ self.assertFalse(exploit_file.exists())
+
+ # cleanup file (should never happen)
+ exploit_file.unlink(missing_ok=True)
+
if __name__ == '__main__':
unittest.main()
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1210626?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: stable
Gerrit-Change-Id: I685320ac3ea837023fc41278c48916786d546eff
Gerrit-Change-Number: 1210626
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/i18n/+/1210573?usp=email )
Change subject: Localisation updates from https://translatewiki.net.
......................................................................
Localisation updates from https://translatewiki.net.
Change-Id: Ieed28c4a66a0b156bf749e6095b88eccfdbe52bf
---
M category/uk.json
M checkimages/uk.json
A replicate_wiki/uk.json
A tracking_param_remover/uk.json
4 files changed, 26 insertions(+), 0 deletions(-)
Approvals:
L10n-bot: Looks good to me, approved
jenkins-bot: Verified
diff --git a/category/uk.json b/category/uk.json
index b74c648..7e26336 100644
--- a/category/uk.json
+++ b/category/uk.json
@@ -7,6 +7,7 @@
"DDPAT",
"Ice bulldog",
"Ignatgg",
+ "MonX94",
"Movses",
"Piramidion",
"Ата",
@@ -15,6 +16,7 @@
},
"category-adding": "Бот: додав категорію [[:Category:%(newcat)s|%(newcat)s]]",
"category-also-in": "(також у %(alsocat)s)",
+ "category-clean": "Бот: Видалення категорії %(category)s, оскільки вона вже належить до %(child)s",
"category-listifying": "Бот: складання списку %(fromcat)s із ({{PLURAL:%(num)d|1 запису|%(num)d записів}})",
"category-removing": "Бот: видалення з %(oldcat)s",
"category-renamed": "Бот: перейменовано з %(oldcat)s. Автори: %(authors)s",
diff --git a/checkimages/uk.json b/checkimages/uk.json
index 01e0196..97f5a92 100644
--- a/checkimages/uk.json
+++ b/checkimages/uk.json
@@ -4,6 +4,7 @@
"Andriykopanytsia",
"Gzhegozh",
"Ignatgg",
+ "MonX94",
"Movses"
]
},
@@ -11,6 +12,9 @@
"checkimages-doubles-file-comment": "Бот: Файл вже у Вікісховищі, тому може бути видалений",
"checkimages-doubles-head": "Дублікат",
"checkimages-doubles-talk-comment": "Бот: сповістити, що файл вже існує у Вікісховищі",
+ "checkimages-doubles-talk-text": "Дякуємо за завантаження %(upload)s. Однак, цей файл є копією: %(image)s. Бот позначив як дублікат файл, який було виявлено найменш використовуваним або найновішим. Якщо ви вважаєте за доцільніше залишити файл позначеним як такий, що має бути видалений негайно, можете видалити дублікати файлів та видалити шаблон видалення з того, що залишився. Це автоматичне повідомлення від %(bot)s.",
+ "checkimages-forced-mode": "('''примусовий режим''')",
+ "checkimages-has-duplicates": "має такі дублікати %(force)s:",
"checkimages-log-comment": "Бот: Оновлення журналу",
"checkimages-no-license-head": "Зображення без ліцензії",
"checkimages-source-notice-comment": "Бот: Запит джерела інформації.",
diff --git a/replicate_wiki/uk.json b/replicate_wiki/uk.json
new file mode 100644
index 0000000..e716ba3
--- /dev/null
+++ b/replicate_wiki/uk.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "MonX94"
+ ]
+ },
+ "replicate_wiki-headline": "Сторінки, що відрізняються від оригіналу",
+ "replicate_wiki-missing-users": "Адміністратори з оригінальної вікі, яких тут немає",
+ "replicate_wiki-same-pages": "Усі важливі сторінки однакові за змістом",
+ "replicate_wiki-same-users": "Усі користувачі з оригіналу також присутні в цій вікі",
+ "replicate_wiki-summary": "Бот: Синхронізація вікі з %(source)s"
+}
diff --git a/tracking_param_remover/uk.json b/tracking_param_remover/uk.json
new file mode 100644
index 0000000..8b90b12
--- /dev/null
+++ b/tracking_param_remover/uk.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "MonX94"
+ ]
+ },
+ "tracking_param_remover-removing": "Бот: Видалення параметрів відстеження з URL-адрес"
+}
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/i18n/+/1210573?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/i18n
Gerrit-Branch: master
Gerrit-Change-Id: Ieed28c4a66a0b156bf749e6095b88eccfdbe52bf
Gerrit-Change-Number: 1210573
Gerrit-PatchSet: 1
Gerrit-Owner: L10n-bot <l10n-bot(a)translatewiki.net>
Gerrit-Reviewer: L10n-bot <l10n-bot(a)translatewiki.net>
Gerrit-Reviewer: jenkins-bot