mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-26 17:38:36 +00:00
The bundled office skills (#68595) read user documents and agent-authored payloads with the locale-default codec: - docx/powerpoint validators/base.py opened OOXML part XML in text mode before handing it to lxml. On Windows (cp1251/GBK) the bytes decode to mojibake that lxml then parses, so validation runs against silently corrupted document text; on locales where the UTF-8 bytes don't decode the validator crashes with UnicodeDecodeError instead of validating. Opening as bytes lets lxml honor the encoding declared in the XML prolog. - The pdf form scripts (fill_fillable_fields, fill_pdf_form_with_annotations, create_validation_image, check_bounding_boxes) read the fields JSON the agent authors — UTF-8 by construction — with the locale codec, so non-ASCII form values (any Cyrillic/CJK/accented input) either crash or get written into the user's PDF as mojibake. The json.dump writers use ensure_ascii=True and were already safe; only the readers needed pinning. Adds a contract test asserting every document/payload reader is locale-independent, plus a live regression test that runs check_bounding_boxes.py on a non-ASCII fields.json under a forced non-UTF-8 locale — it fails without the fix on both POSIX (C locale) and Windows (cp1251 chokes on the 0x98 byte of U+2018). |
||
|---|---|---|
| .. | ||
| test_cloudflare_temporary_deploy_skill.py | ||
| test_darwinian_evolver_skill.py | ||
| test_fetch_transcript.py | ||
| test_google_workspace_api.py | ||
| test_google_workspace_credential_files.py | ||
| test_hyperliquid_skill.py | ||
| test_mcp_oauth_remote_gateway_skill.py | ||
| test_memento_cards.py | ||
| test_office_document_skills.py | ||
| test_openclaw_migration.py | ||
| test_openclaw_migration_hardening.py | ||
| test_pinecone_research_skill.py | ||
| test_telephony_skill.py | ||
| test_tldraw_offline_skill.py | ||
| test_unbroker_skill.py | ||
| test_xurl_article_ingestion_docs.py | ||
| test_xurl_x_search_routing.py | ||
| test_youtube_quiz.py | ||