带有斜杠的页面标题上的权限问题真的很奇怪

问题描述

我正在使用:

我遇到的问题是,当我尝试编辑、移动或删除标题中带有“/”的页面时,我从 api 收到权限被拒绝错误。这是通过 UI 发生的,在某些情况下,事情只是地失败,我不得不打开浏览器的开发工具来查看网络选项卡。

这种情况已经发生有一段时间了,我们已经设法在任何页面标题中不使用“/”,但最近安装了 Translate 扩展,并且由于存储了翻译而导致问题在 title/segment/lang 之类的页面中。

保存翻译发布此数据:

action=edit&
format=json&
title=Translations%3ATest%2FPage+display+title%2Fes&
text=asdasdsasd&
summary=&
assert=user&
token=XXXX19%2B%5C

它从 api.PHP 返回:

{
  "error":
  {
    "code":"permissiondenied","info":"You are not allowed to execute the action you have requested.","*":"See https://localhost/api.PHP for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
  }
}

用户肯定已经设置了所有翻译权限,即使我将所有翻译扩展权限设置为“*”的 true 也会发生这种情况。

有谁可能知道是什么导致了这些问题?或者是否有某种方法可以调试它以隔离什么权限以及在哪里检查它?看起来其他一切正常。我对 mediawiki 没有太多经验,以前有人管理它,但他们已经离开了。

解决方法

尝试将 AllowEncodedSlashes NoDecode 添加到您的 Apache 配置中,并将 nocanon 添加到其中的 ProxyPass 指令。