* Logs - Keep notification URL passwords and the browser token out of the log output
- Every notification that was sent logged its URL in full at INFO level
("AppRise start notifying '...'"), password or webhook token included.
- The notification log page kept the same URLs in what it shows as sent.
- The puppeteer fetcher logged the whole browser connection URL, which carries
the access token of the browser service and the proxy of the watch.
Notification URLs are now masked the way Apprise does it for its own output
(the helper the MCP tools already used, moved to notification/masking.py), and
the fetcher logs the browser's scheme, host and port only.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Logs - Name the notification target without asking Apprise about the URL
process_notification() collects what Apprise logs while it works and takes a
warning in there for a failed send. Masking the URL for the log line with
Apprise's own privacy mode made Apprise read every URL, and one it has no
service for (the null:// the RSS feed renders through) logs a warning: every
RSS feed answered 500.
The log line now gets the scheme and host from the URL itself. The
notification log page and the MCP tools keep Apprise's masking, they run
outside of that collection.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
A parked domain answers with an empty document whose onload sets
location.href. goto() returns no response for it, which was taken as "the page
did not fetch": three retries in two seconds, then "EmptyReply - try increasing
'Wait seconds before extracting text', Status Code None", for a page that goes
on to load fine.
Use the main-frame response that was already seen, as the interstitial case
does, and carry on to the content-ready wait where the page it lands on is
picked up.
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* Puppeteer fetcher - Favicon falls back to the copy the browser fetched for itself
The in-page favicon fetch is page script, which may not read an icon on another host unless that host
allows it. When it comes back empty, use the response of the browser's own icon request instead.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Test - favicon fallback test skips before asking for a browser, test_content.py also runs in the selenium job
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
They were only in the text part of the answer, and clients that show only the structured part got the
request's summary row and nothing else.
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* MCP - get_network_log tool, recheck_watches can record the network requests and use another proxy for that one check
- recheck_watches: record_network=true and proxy=<name or id of a configured proxy, or 'none'>,
both go into the queue item and apply to that one check only (queued_metadata)
- get_network_log: the requests of the recorded check, then one request's headers and body,
cookie/authorization values hidden
- queue_rechecks(metadata=): merged into an item that is already queued instead of being dropped
* MCP - recheck_watches wait=true tells a new check from the previous one by check_count, not whole-second last_checked
A recheck asked for in the same second the previous check finished was reported with the previous result.
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
round() could stamp last_checked and the snapshot's history timestamp up to half a second in the future.
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* Puppeteer fetcher - Optional HAR network recording per watch via HAR_UUID_RECORD (#4539)
Set HAR_UUID_RECORD to a comma separated (case insensitive) list of watch UUIDs and
each check of those watches saves the browser's network traffic as HAR 1.2 to
{datastore}/{uuid}/har-record.zip, replacing the one from the previous check.
Failed fetches are recorded too.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Playwright fetcher - HAR_UUID_RECORD network recording too, using playwright's own HAR recorder (#4539)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* HAR recording - requests fetcher too, HAR_FORMAT=zip|har, HAR_INCLUDE_BINARY, test it arrives in the watch data package (#4539)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* docker-compose.yml - Shorter HAR_UUID_RECORD note, next to the logging options
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Queue item dict is passed to the processor and content fetcher as queued_metadata, one-shot 'record_har' option (#4539)
Whatever a check was queued with now reaches the processor and the fetcher, so an
option can apply to that one check only without being stored on the watch.
{'uuid': .., 'record_har': True} records the HAR for that check.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* UI - Watch list - add a 'Healthy' status filter, the inverse of 'With errors' (#4245)
After a bulk import the operator can already narrow the list to watches
that failed their last check, but not to the ones that are fine. Add a
'Healthy' chip next to 'With errors' that shows only watches without a
last_error.
The filter lives in watchlist/filters.py next to the other status toggles,
so the bulk actions that reuse it (mark-all-viewed, recheck-all) and the
redirect-back-to-filtered-view behaviour pick it up automatically. The chip
is only rendered while the current view has both failing and healthy
watches, since otherwise it would be identical to All (or empty).
* Watch list - regenerate translation catalogs for the new 'Healthy' filter string
pytest-flask falls back to "localhost.localdomain" as the live_server name when
SERVER_NAME is unset. Nothing inside the test container resolves that name
(/etc/hosts only has "localhost"), so every test fetch relied on whatever the
runner's upstream DNS answered. When it did not answer, test_errorhandling.py
failed 4 of 5 in the selenium-tests job with
"Failed to resolve 'localhost.localdomain'".
Default the test app to "localhost". FLASK_SERVER_NAME still overrides it.
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* Notifications - post:// get:// etc, ?user= and ?pass= are sent as query parameters again (#4726)
Since apprise 2.1.0 a ?user= in the query string was lifted into the URL as a
login, which then failed with "'str' object is not callable". The query string
belongs to the remote endpoint, so it is now always sent on untouched, and a
username without a password is no longer treated as a login.
tests/apprise/ now runs in run_basic_tests.sh (it was never run by CI).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Notifications - post:// get:// etc, show the exception type on a failed send, traceback at TRACE level
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
The URL list importer separates a line into URL and tags by splitting on the
first space. A jinja2 block in a watch URL can legitimately contain spaces, so
the split cuts the block in half: importing
https://example.com/?date={% now 'utc', '%d' %} tag-a
gave url="https://example.com/?date={%" and tags="now 'utc', '%d' %} tag-a".
The truncated URL then fails is_safe_valid_url() (it jinja2-renders any URL
containing '{%', and the fragment is a syntax error), so add_watch() returns
None and the watch is silently reported as skipped.
Split on the first space that sits outside any {% %} / {{ }} block instead.
Whitespace inside a jinja2 block belongs to the URL; only whitespace outside
one can separate the tags. Lines with no jinja2 block behave exactly as before.
Three new hooks (plugin API 0.7.0), so features like OAuth 2.0 client
credentials (#375), HMAC signing or rotating API keys can live in plugins
instead of core:
- fetch_request_alter: change headers, method and body just before the
fetch; gets the check's proxy URL. Exceptions fail the check rather than
sending the request without what the plugin meant to add.
- ui_edit_request_settings: a plugin's WTForms form nested into the edit
page's Request tab under "Show advanced options", validated with the
page, saved to {watch data dir}/{plugin_id}.json, never the watch itself.
- watch_settings_files: files "Clear history" keeps, beside the
processors' {processor}.json.
plugin_api exports load_watch_plugin_settings / save_watch_plugin_settings.
Adds the request/api_key_header example plugin, which uses all three.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Plugins - one core set_watch_last_viewed hook for every "watch was viewed" path
#4698 added restock_diff_mark_watch_viewed, but it only covered the restock history page and
watch list chart. The text diff page, the AI summary roll-down, Mark viewed, Mark unviewed and
Mark all viewed still wrote last_viewed directly, so a plugin tracking views missed most of them.
All of them now go through pluggy_interface.set_watch_last_viewed(), which calls the core
set_watch_last_viewed(watch, datastore, timestamp, source) hook. Returning None observes,
anything else replaces the save. The restock-only hook and its built-in are removed (unreleased).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Plugins - last_viewed is always saved, the hook only reports it
The hook is now watch_last_viewed_updated, a plain notification called after
datastore.set_last_viewed(). Return values are ignored, so a plugin can no longer
stop or replace the save (a stray `return True` used to switch off view tracking
for every watch).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
_is_local_llm_endpoint() only uses is_private_hostname() to pick the longer
local timeout; nothing is blocked. Add classify_only=True to log at debug.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
ChatGPT's CIMD metadata declares token_endpoint_auth_method 'private_key_jwt', which was refused as
"only public clients". A CIMD client now uses exactly the method its metadata names: 'none' (PKCE alone)
or 'private_key_jwt', checked with Authlib's JWTBearerClientAssertion against the keys at its jwks_uri.
- jwks_uri must be on the client_id's host, fetched with the same SSRF-safe fetcher, cached, refetched
(rate limited) for an unknown kid so key rotation works
- asymmetric algorithms only, aud = issuer or token endpoint at the public MCP address, each jti used once,
assertions valid for over an hour refused
- a signing client can't fall back to 'none', also on refresh; PKCE S256 still required
- DCR stays public: another requested method gets 'none' in the answer (RFC 7591 3.2.1) instead of an error
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Both are the watch's own setting, same as the single watch GET. "Pause all" and
"mute all" stay separate (all_paused/all_muted in /systeminfo), folding them in
would be wrong info and a client writing the values back would pause every watch.
Spec: SearchResult now matches the real response (no "watches" wrapper).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The key field renders readonly so Chrome won't autofill the saved site password
into it, and global-settings.js drops readonly on focus/click. The AI settings
page moved to its own template (#4637) and never loaded global-settings.js, so
the field stayed readonly for good. The test only checked the script's contents,
it now also checks that the page loads it.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
"Remove provider", then a new provider and Save, switched off "Use LLM
as a fallback for extracting price and restock info". The Behaviour
checkboxes are only rendered while a model is saved, an unticked
checkbox posts nothing, and WTForms reads a missing one as False. With
LLM_MODEL set, debug and local_thinking_off were switched off the same
way on every Save.
save_llm_form() now keeps the stored value of a checkbox the page
didn't show, checked with the template's own conditions against the
stored settings. Unticking a checkbox the page shows still switches it
off.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: dgtlmoon <dgtlmoon@gmail.com>
Off by default. When on, a request with no credentials at all gets read-only access (monitors and tags on Read,
notifications, browser steps, system info and plugin rows on None) instead of a 401; a wrong token still gets
the 401. Tool calls without a token are limited per address (MCP_ANONYMOUS_CALLS_PER_MINUTE, default 30).
USE_X_SETTINGS_PROXY_COUNT (default 1) sets how many proxies add to X-Forwarded-For, so the client's address
is right behind two proxies (e.g. changedetection.io/mcp-demo -> lemonade -> instance).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Plugin tools always counted as the Monitors row, so a tool that isn't about monitors (e.g. a sign-up tool on a
read-only demo) had to pretend to be read-only. Now:
- register_mcp_permission_rows hook: a plugin adds a row to the None/Read/Write grid (tokens and the OAuth
consent screen), None for every token until the owner allows it, offering only the levels its tools need.
- a plugin tool's 'area' puts it in a core row or a plugin row; 'open_world': True sets openWorldHint.
- refusals name the row by its grid label; the token list shows plugin rows, and the Browser row's label,
which was missing.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
From Glama's tool description scores (TDQS): say what each returns, which sibling tool to use instead and
when, what an empty result means, and document the paging arguments (limit/offset had no description).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Requirements are unpinned, so an upstream release can add a package (today: w3lib 2.6.0 pulls in frostwork,
Apache-2.0) and fail every open PR's build on docs/THIRD-PARTY-LICENSES.md, and a local rebuild can resolve
differently from the CI one. The copyleft gate already fails any build that would ship GPL/AGPL.
- test-stack-reusable-workflow: the drift check prints the diff as a warning instead of failing.
- New third-party-licenses.yml: builds the shipped image weekly (Monday) and on every published release,
regenerates the file and opens or updates a PR (auto/third-party-licenses) when it changed. Weekly only for
added/removed packages or licence changes; on a release also for version changes. Manual run too.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Fix two races behind flaky tests: favicon cache and a new monitor queued twice
- Favicon: get_favicon_filename() could glob before a save and store its "no favicon" after the save cleared
the cache, leaving the icon missing until the next save. The lookup and the clearing now share a lock.
test_favicon_url_change also lets the new monitor's first check finish before saving a favicon.
- Scheduler: its queued/running lists are from the start of a pass, so a monitor a worker had just taken off
the queue (not claimed yet) looked idle and was queued again, and that copy was re-queued until the first
check finished, so it ran twice (test_fallback_fetchers_chain_in_priority_order saw 2 calls). The ticker now
re-checks live before queueing and stamps scheduled_at; a worker drops a scheduled item when the monitor
was checked since then.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Bump licence
* Fix two more races from this PR's CI: a new watch's first check before the test (or its config) is ready
- tests/util.py wait_for_all_checks(client): an import or API create doesn't queue the watch, the scheduler picks
it up on its next pass, so the queue could be empty (and the wait return) before the first check started; the
test then changed the page under it. test_nonrenderable_pages failed this way: the first check fetched the
"no text" page, so no first snapshot. It now also waits (5s at most) until every unpaused watch was checked.
- api/operations create_watch: the processor config was saved after add_watch(), so the scheduler could check the
new watch with the processor's defaults first (test_example_wordcounter_processor_plugin counted 7 words, not
5). With processor config it's added paused until the config is saved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Tests - queue UI: keep workers stopped through the scheduler's health check, and restore them after
_quiesce() stops every worker, but the scheduler's worker health check (every 60s, even while paused) restarts
them up to FETCH_WORKERS / the workers setting; when it fired during a test they took the sentinel and the test
failed with "Could not get queue to a quiescent state". It now expects 0 workers for the test (FETCH_WORKERS and
the setting, via monkeypatch). The workers were also never put back, so the next test on that pytest worker ran
with none until the health check: an autouse fixture now restores the count they had before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The OAuth issuer (and the MCP address shown on the MCP tab) came from the notification Base URL or BASE_URL.
Now it is its own setting on the MCP Server > Settings sub-tab (settings.application.mcp_base_url), falling
back to the request's address (X-Forwarded-* included). The notification Base URL only does notifications.
Grants are bound to {issuer}/mcp/v1, so update_34 carries the old Base URL over once when existing sign-ins
were made through it. Changing the address flashes that OAuth connections need to connect again.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
clear_watch() globs the monitor's folder then unlinks each file. A watch.json save or a running check
writes a .tmp file and os.replace()s it into place, so the .tmp can vanish between glob() and unlink(),
raising FileNotFoundError. Seen as an intermittent test_mcp_write_tools failure (clear_history tool).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Claude Code's CIMD metadata lists http://localhost/callback and
http://127.0.0.1/callback, then signs in on a port it gets from the OS
(http://localhost:53228/callback). check_redirect_uri() only accepted an
exact match, so the sign-in was refused.
An http redirect URI on localhost, 127.0.0.1 or ::1 now matches the same
host, path and query on any port. Everything else stays an exact match.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>