Commit Graph

132 Commits (2ed5a79e64f55cda11d99994af06dedbb9d6b823)

Author SHA1 Message Date
JustAMacUser 39bbbef030 Fix E_NOTICE in `add_handler()`. 4 years ago
Andrew Dolgov f4d0e7bb6d * af_redditimgur: optionally import score
* add pluginhost->set_array() to set many plugin settings at once
4 years ago
Andrew Dolgov 8256ab5dd9 wip: initial for db_migrations 4 years ago
Andrew Dolgov 0cb719a404 add basic local plugin uninstaller 4 years ago
Andrew Dolgov 0730128a97 add a send test email button to prefs/system 4 years ago
Andrew Dolgov 86b12fc06c pluginhost: remove namespace classloader, plugins should use composer instead 4 years ago
Andrew Dolgov 70adfd4a74 * sanitize: never rewrite relative links to our own prefix
* use Config::get_self_url() instead of get_self_url_prefix() in a bunch
of places
4 years ago
Andrew Dolgov c01b6e43fd add pluginhost->get_array() shorthand 4 years ago
Andrew Dolgov 42173386b3 dirname(__FILE__) -> __DIR__ 4 years ago
Andrew Dolgov be4e7b1340 fix several issues reported by phpstan 4 years ago
Andrew Dolgov 33fff26869 reinstate HOOK_RENDER_ENCLOSURE 4 years ago
Andrew Dolgov fc0ebf0891 move bookmarklet-related methods out of public.php into the plugin 4 years ago
Andrew Dolgov e4609c18ef * add (disabled) shortcut syntax for plugin methods
* add controls shortcut for pluginhandler tags
 * add similar shortcut for frontend
 * allow plugins to selectively exclude their methods from CSRF checking
4 years ago
Andrew Dolgov 273ada7353 * implement shortcut syntax for exposed plugin methods
* move shared article rendering code to share plugin
4 years ago
Andrew Dolgov 257efb43c6 article: unify naming 4 years ago
Andrew Dolgov a5819569f2 pluginhost: a few more warnings and type hints 4 years ago
Andrew Dolgov d91eae9c7e pluginhost: add some type hints 4 years ago
Andrew Dolgov 6e57fd77af db: add type hints 4 years ago
Andrew Dolgov a14873d5b4 more hooks, also add type hint for PluginHost::getInstance() 4 years ago
Andrew Dolgov ca4c93c6b9 pluginhost: note hook function prototypes 4 years ago
Andrew Dolgov a341a838b1 pluginhost: deny hook registration to plugins which lack relevant implementation methods 4 years ago
Andrew Dolgov 3b52cea811 move some old-style handlers to new callback ones 4 years ago
Andrew Dolgov 1eb1629d9e pluginhost: rework run_hooks() to be shorter, add callback variant; implement exception handling for both 4 years ago
Andrew Dolgov 20b56b5b23 pluginhost: catch errors while loading plugin source code 4 years ago
Andrew Dolgov 4165834f80 pluginhost: catch fatal errors in plugin init 4 years ago
Andrew Dolgov c94f1b6ff8 fix some more warnings reported by phpstan 4 years ago
Andrew Dolgov 403dca154c initial WIP for php8; bump php version requirement to 7.0 4 years ago
Andrew Dolgov 25520e9784 Select... dropdown: replace dijit Select with DropDownButton, simplify layout
PluginHost: add HOOK_HEADLINE_TOOLBAR_SELECT_MENU_ITEM
Headlines.onActionChanged: removed
4 years ago
Andrew Dolgov ee4b7bebe8 pluginhost: load_data: check schema last 4 years ago
Andrew Dolgov 40f38fc87f pluginhost: load plugin data automatically (also marks load_data method as private) 4 years ago
Andrew Dolgov 6811d0bde2 use self:: in some places to invoke static methods from the same class 4 years ago
Andrew Dolgov a4525d31b2 replace FALSE with false so that static analyzer shuts up about it 4 years ago
Andrew Dolgov c3d14e1fa5 - fix multiple vulnerabilities in af_proxy_http
- fix vulnerability in rewrite_relative_url() which prevented some URLs from being properly absolutized
- fetch_file_contents: validate all URLs before requesting them
- validate URLs: explicitly whitelist http and https scheme, forbid everything else
- DiskCache/cached_url: only serve whitelisted content types (images, video)
- simplify filename/URL handling code, remove and consolidate some less-used functions
4 years ago
Andrew Dolgov ddf9227dc4 pluginhost: allow overriding default sort modes via HOOK_HEADLINES_CUSTOM_SORT_MAP etc 4 years ago
Andrew Dolgov 6573541873 * add HOOK_ENCLOSURE_IMPORTED
* pass feed id to HOOK_FEED_PARSED
5 years ago
Andrew Dolgov 208e02c47d PluginHost/save_data: use separate PDO connection to prevent issues with nested transactions 5 years ago
Andrew Dolgov d15f0349bf remove hardcoded iframe domain whitelist, make iframe script whitelisting configurable by plugins (HOOK_IFRAME_WHITELISTED) 5 years ago
jc 8fd11fd53a Add const HOOK_FEED_TREE 5 years ago
jc a243979aaf Add const HOOK_FEED_TREE 5 years ago
Andrew Dolgov 3e4701116d af_readability: add missing file 5 years ago
Andrew Dolgov 865c54abcb fix get_method_url() to use correct method parameter 5 years ago
Andrew Dolgov 10c63ed582 pluginhost: add helper methods to get private/public pluginmethod endpoint URLs 5 years ago
Andrew Dolgov 7f8946f14e pluginhost: implement priority-based system for running hooks 5 years ago
Andrew Dolgov 9d852e052c add HOOK_ARTICLE_IMAGE for Article::get_article_image() 5 years ago
Andrew Dolgov fdb6066bf6 * HOOK_ENCLOSURE_ENTRY: pass article_id to handler
* DiskCache: multiple fixes; support isWritable() for cache entries, set content-disposition for send()
* public/cached_url: allow selecting files from sub-caches other than images
* plugins/Cache_Starred_Images: rework to use DiskCache, can be enabled per-user, properly handles article enclosures, etc
5 years ago
Andrew Dolgov 6955b2e02d plugins: add HOOK_GET_FULL_TEXT which may be used to provide full text extraction to core code and other plugins, instead of trying to invoke af_readability specifically 6 years ago
Andrew Dolgov 614a4b3b4a pluginhost: remove plugin gettext helpers (moved to plugin base class) 6 years ago
Andrew Dolgov c1175070a2 add P_sprintf 6 years ago
Andrew Dolgov 72fcc81919 support per-plugin locale directories 6 years ago
Andrew Dolgov 95f63e121a note that HOOK_FORMAT_ARTICLE_CDM is dead for now 6 years ago