Repository navigation
backlot: gestisci errori e applica policy HTTPS - #974
Open
LightYagami28 wants to merge 1 commit into
Open
LightYagami28 wants to merge 1 commit into
LightYagami28 wants to merge 1 commit into
Conversation
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.
Problema
backlot/__main__.py:76-77edbacklot/server.py:377-378avevano catch vuoti: il primo inghiottiva ogni errore diwebbrowser.open, il secondo restituivaNonesenza traccia quando la generazione di un'anteprima falliva.backlot/server.py:348usava SHA1 senza dichiarare l'uso non crittografico (finding bandit B324).resolveAsset.ts:4e i provider intools/video/*.pyaccettavanohttp://per qualsiasi host: URL remoti non cifrati potevano entrare nel compositor e nei provider.Soluzione
OSError/webbrowser.ErroreOSError/ValueError/subprocess.SubprocessError, con messaggio esplicito. Nessunpassvuoto.hashlib.sha1(..., usedforsecurity=False)per la chiave della cache di contenuto.tools/video/url_policy.py: HTTPS con host, oppure HTTP solo versolocalhost,127.0.0.1e::1(server locali di fiducia). Usata daatlas_video,pika_video,seedance_arkevideo_compose.resolveAsset.ts: HTTPS,data:e HTTP loopback ammessi; HTTP verso host remoti respinto con errore esplicito.Prove
py -3 -m compileall -q tools/video backlot→ exit 0.True,http://127.0.0.1:8188ehttp://localhostTrue,http://example.comFalse,ftp:edata:False— 6/6 OK.node_modules/.bin/tsc --noEmitinremotion-composer→ exit 0.Impatto
Anteprime e browser: gli errori ora sono visibili nei log invece di essere silenziosi; il contenuto della cache SHA1 resta identico. I provider rifiutano URL HTTP remoti: eventuali pipeline che usavano URL non cifrati dovranno passare a HTTPS (il loopback resta supportato per i server locali).