# Is it almost prohibited to downgrade recent Anki security updates by add-on?

**URL:** <https://forums.ankiweb.net/t/is-it-almost-prohibited-to-downgrade-recent-anki-security-updates-by-add-on/63105>\
**Category:** Development\
**Created:** [June 25, 2025, 6:49am UTC](https://forums.ankiweb.net/t/is-it-almost-prohibited-to-downgrade-recent-anki-security-updates-by-add-on/63105 "2025-06-25T06:49:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shigeyuki](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/shigeyuki/32/23878_2.png) [@Shigeyuki](https://forums.ankiweb.net/u/Shigeyuki)\
**Post date:** [June 25, 2025, 6:49am UTC](https://forums.ankiweb.net/t/is-it-almost-prohibited-to-downgrade-recent-anki-security-updates-by-add-on/63105/1 "2025-06-25T06:49:24Z")

</div>

Background: The add-on “[Searching, PDF Reading & Note-Taking in Add Dialog](https://github.com/fonol/anki-search-inside-add-card)” stopped working in the latest Anki 25.04 ~ 25.07, so I am trying to fork it and fix it. This add-on is for creating notes from PDFs inside the Editor, and is popular because it used to have 200+ ratings. Development by the original author ([fonol, Tom Z](https://github.com/fonol)) is discontinued around 2022. (The [add-on page](https://ankiweb.net/shared/info/1781298089) has been removed and the Github repository is archived)

So far the fix of add-ons broken by the Anki security update is going very well and there have been very few problems (Probably the [solution by Glutanimate](https://github.com/ankitects/anki/commit/79b19a17a3160e461a62aadfa557f57b36e1e05d) is working), the IPA add-ons notified in Anki’s release have already been fixed and other broken add-ons can be fixed or replaced.

However the code for Search PDF is complex, functions for searching PDFs and notes, ebooks, pomodoro timers, etc. are all embedded in the Editor. It generates HTML and Javascript in Python and onclick has 500+ uses, so I already know how to fix it but codes are complicated and it takes time to check the operation and cannot be immediately fixed. (I think it is repairable in the long run.)

For now a practical workaround is to monkey-patch “aqt.mediasrv.legacy\_page\_data” and downgrade to [the older version.](https://github.com/ankitects/anki/commit/ddb8573e8daf0fcfda4422b6738a044197d7cfd6#diff-9904faac0b4144bb89eaa2c1205913d0b1322b0476d4152c1720255f57d781c5) (e.g. Monkey patch downgraded security version of add-on released (warn users) → gradually replace JavaScript in SearchPDF → make sure it works → release version with security restored)

But I thought that the development of such an add-on that downgrades security might be prohibited by the official Anki or the development community in the first place. (I think basically add-ons can be developed freely but add-ons uploaded to AnkiWeb will be governed by Anki’s terms of service, etc.) Is downgrading recent security updates with add-ons prohibited or very strongly discouraged?

---

<div class="post-metadata">

**Author:** ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/abdo/32/654_2.png) [@abdo](https://forums.ankiweb.net/u/abdo)\
**Post date:** [June 25, 2025, 7:31am UTC](https://forums.ankiweb.net/t/is-it-almost-prohibited-to-downgrade-recent-anki-security-updates-by-add-on/63105/2 "2025-06-25T07:31:34Z")

</div>

Personal opinion: I don’t like the sound of the idea of patching security fixes to make complex add-ons work. Maybe it’s worth taking a slow approach here? I mean, the add-on has been broken for a while, as far as I know.  
Additionally, I can’t help but note that the add-on will probably require even bigger changes soon after [#4029](https://github.com/ankitects/anki/pull/4029) is finalized. That PR will also make the security fix more important, as the editor will have wider access to the internal API.

---

<div class="post-metadata">

**Author:** ![Shigeyuki](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/shigeyuki/32/23878_2.png) [@Shigeyuki](https://forums.ankiweb.net/u/Shigeyuki)\
**Post date:** [June 25, 2025, 9:24am UTC](https://forums.ankiweb.net/t/is-it-almost-prohibited-to-downgrade-recent-anki-security-updates-by-add-on/63105/3 "2025-06-25T09:24:15Z")

</div>

Hmmm well, it may be dangerous in the future if there are more add-ons that use security patches. I’ll release a placeholder for this add-on that excludes patches and develop it slowly.

---

<div class="post-metadata">

**Author:** ![eroscard](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/eroscard/32/22632_2.png) [@eroscard](https://forums.ankiweb.net/u/eroscard)\
**Post date:** [June 25, 2025, 2:47pm UTC](https://forums.ankiweb.net/t/is-it-almost-prohibited-to-downgrade-recent-anki-security-updates-by-add-on/63105/4 "2025-06-25T14:47:45Z")

</div>

I think this addon looks like the one I made recently, if you want to test it.

watch the video, there is no sound, but I think you can understand it.

> **[video2.mp4](https://drive.google.com/file/u/0/d/1JNxDw3Bl2FUhofNMCHQnFdW5ROS7qFJb/view)**

[https://ankiweb.net/shared/info/16097657](https://ankiweb.net/shared/info/16097657)

---

<div class="post-metadata">

**Author:** ![Shigeyuki](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/shigeyuki/32/23878_2.png) [@Shigeyuki](https://forums.ankiweb.net/u/Shigeyuki)\
**Post date:** [June 25, 2025, 6:31pm UTC](https://forums.ankiweb.net/t/is-it-almost-prohibited-to-downgrade-recent-anki-security-updates-by-add-on/63105/5 "2025-06-25T18:31:48Z")

</div>

It seems to me that the basic structure is similar. For now this add-on is too multifunctional and broken so it might be easier to maintain it by reducing functions as much as possible and replacing it with a simple add-on.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [June 30, 2025, 8:09am UTC](https://forums.ankiweb.net/t/is-it-almost-prohibited-to-downgrade-recent-anki-security-updates-by-add-on/63105/6 "2025-06-30T08:09:09Z")

</div>

It would be irresponsible to patch out security fixes without the user’s knowledge, but if you’re presenting a big scary warning they can’t miss or misunderstand, it’s probably not much more harmful than recommending users run an old Anki version to use the add-on, which many authors already do without much thought to such things.

The good news at least is that with most users being protected, there’s a much-reduced incentive for someone to try and abuse the holes that were patched up, as they’ll have limited reach.

---

<div class="post-metadata">

**Author:** ![Shigeyuki](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/shigeyuki/32/23878_2.png) [@Shigeyuki](https://forums.ankiweb.net/u/Shigeyuki)\
**Post date:** [July 4, 2025, 6:17pm UTC](https://forums.ankiweb.net/t/is-it-almost-prohibited-to-downgrade-recent-anki-security-updates-by-add-on/63105/7 "2025-07-04T18:17:02Z")

</div>

I almost completed all the fixes for this add-on, so the monkey patch for security is no longer needed, thanks.

> [@abdo](#):
>
> I can’t help but note that the add-on will probably require even bigger changes soon after [#4029](https://github.com/ankitects/anki/pull/4029) is finalized.

I built and tested it and found that some hooks were broken but all were resolved (complete support is not yet available but maybe after the release I’ll be able to adjust it), so no major problems. The new editor has a more stylish design and code, so I think it seems to be better.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [August 3, 2025, 6:17pm UTC](https://forums.ankiweb.net/t/is-it-almost-prohibited-to-downgrade-recent-anki-security-updates-by-add-on/63105/8 "2025-08-03T18:17:40Z")

</div>

Closed on August 3, 2025, 6:17pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
