Repository navigation
🔒️ Stop shipping the CEP debug port, slim the install, cache the update check - #8
Merged
Merged
Conversation
…nstall - Installers copy only the runtime files plus LICENSE and NOTICE.md; .debug (remote debugging on port 9004) is copied only from a git checkout, left out of the release zip, and removed from older user installs by the installer and by the panel at startup (kept when .git or a dev-source record exists). - Installer no longer breaks on source paths containing ")". - Silent update check reuses GitHub's answer for 6 hours and revalidates with If-None-Match; the update button always asks. - Before / After refreshes on document activation and History selection. Photoshop 23.2 sends no event for Ctrl+Z or layer show/hide. - Panel command dispatch uses a lookup table (same ExtendScript as before); index.html has a doctype (layout measured unchanged). - README and site state Photoshop 2021+, supporters without a photo get a neutral avatar, and the tab list includes Watermark. - npm test runs every tests/check-*.js, and CI uses it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes from a review of the plugin, in priority order.
Security: the debug port is no longer installed for users
.debugturns on Chromium remote debugging (port 9004) for a panel that hascep.fsandevalScript. Because the installer also enablesPlayerDebugMode, every user install had this port open.install/Cai-dat-SCCTLM_Foto.batand.commandcopy only the runtime set (index.html,style.css,loader.jsx,CSXS/ js/ jsx/ css/ img/ presets/) plusLICENSEandNOTICE.md. They also removetests/,docs/,.github/andREADME.mdthat older installers copied..debugis copied only when installing from a git checkout..gitattributeskeeps it out of the release zip (export-ignore)..debugat startup (scctlmFotoDropDebugPort,js/dev-source-sync.js), unless.gitor a dev-source record exists. The port closes from the next Photoshop start.), such asSCCTLM_Foto (1).Update check
The silent check reuses GitHub's answer for 6 hours (
localStorage) and revalidates withIf-None-Match(a 304 doesn't count against the 60/hour limit). The ⤓ button always asks GitHub.Before / After refresh
The button now refreshes on
documentAfterActivateand on History selection (slctviaPhotoshopRegisterEvent). Tested live in Photoshop 23.2: one state read per change and none when idle. Photoshop sends no event for Ctrl+Z, Ctrl+Shift+Z or layer show/hide (checked with an event logger, even withundoEvent/Shw/Hdregistered), so the code registers only what fires and the docs say so.Other changes
run()injs/panel.jsuses a lookup table instead of chained ternaries. The generated ExtendScript is byte-identical to the old code across 23 valid and invalid inputs.index.htmlhas<!DOCTYPE html>andlang="vi". I measured 758 elements across all 5 tabs at 300 px in quirks vs standards mode, and they are identical.:focus-visible,aspect-ratio) needs a Chromium that CC 2015 doesn't have.manifest.xmlhost versions are unchanged, so no host gets blocked.#link. The README tab list now includes Watermark.package.json(no dependencies) addsnpm test→tests/run-checks.js, and CI uses it.Testing
npm test: 24/24 pass. New:tests/check-debug-port.js, plus additions tocheck-github-updater.js(cache/ETag) andcheck-before-after.js(event registration and debounce).git archivesource and from a path containing(1). macOS installer run with a stubrsync;bash -nok..debugsurvives a reload on the junction dev install.Reviewer notes
release-manifest.jsonmust be re-signed (node scripts/release-sign.js) before tagging.release-verifyreports hash mismatches until then.rsync/cppath) or on Photoshop older than 23.2.jsx/files (TC next). It needs the separate clean-room process.