Record final Development Context acceptance and HTTP denial checks
This commit is contained in:
parent
504eccacd6
commit
2eede4e941
@ -79,3 +79,15 @@ Underlying gaps: no structured first-meeting marker; no established general near
|
||||
Map/Location/Floor Plan capability handlers are not added by this programme: location commands return an explicit non-disruptive full-location-editor fallback until a suitable tool advertises the contract. Previous/next appearances are scoped to the selected book. Existing ambiguous/unverified relationship events and structural pair/type/direction changes require the full editor.
|
||||
|
||||
No known Development build/regression blockers remain. Physical-client acceptance and the above underlying-system gaps should be considered explicitly before broader launch claims.
|
||||
|
||||
### Final Development installation and acceptance
|
||||
|
||||
Deployed source commit **`504eccacd6a9f2b86cf496e51f025ccd107520c7`** (phase5), installed 22 November 2026 at 15:44:23 UTC. Archive `/srv/apps/plotdirector-dev/releases/context-enhancement-phase5-504ecca-20261122T154413Z`; reversible application backup `/srv/apps/plotdirector-dev/current-before-context-enhancement-phase5-504ecca-20261122T154413Z`. Active-job guard passed immediately before restart. Service active; local HTTP/public TLS GET200. Deployed informational version matches commit. Published/live SHA-256 matched for assembly, workspace, windows, tools, focused-editing JavaScript and CSS. Assembly SHA-256: `7b65808ca757394693ae94b839008d7b1d7b4cdf73d886110a87ccb7d19213b3`.
|
||||
|
||||
Post-installation actual Development checks passed again: authenticated Characters/Names/Relationships reads; two separately logged-in browser contexts receiving precisely targeted scene and character commands; only recipient pane HTTP reload, no Word navigation, no-handler, cross-user/book/story-point rejection and reconnect registration; persisted focused description/alias/relationship corrections, failed inline draft retention, cancel without persistence, one initiating success and quiet second session. Both windows retained exactly one Context SignalR connection.
|
||||
|
||||
`Browser/context-live-security.cjs` independently verified unauthenticated denial, foreign book/scene/character/relationship denial, malformed missing-field rejection and antiforgery on both save routes. Established cookie authentication redirects forbidden requests to `/Account/AccessDenied`; this is treated as denial, not a raw403 assertion. No mutation requests without a valid antiforgery token persisted.
|
||||
|
||||
Post-installation journal review: one pre-existing HTTPS-redirection configuration warning; three expected SignalR dispatcher error entries from deliberate Unsupported interaction / Book unavailable / Invalid story point rejection tests. No unexpected application exceptions found. Production remains unchanged. Validation-only follow-up documentation/tests do not change the deployed source hash above.
|
||||
|
||||
Implementation commits, in phase order: `16c0505` → `6e6c7fd` → `c63925c` → `3784599` → `504ecca`. All qualified phases were deployed separately to Development. The two pre-existing untracked audit/investigation documents were preserved.
|
||||
|
||||
8
PlotLine.Tests/Browser/context-live-security.cjs
Normal file
8
PlotLine.Tests/Browser/context-live-security.cjs
Normal file
@ -0,0 +1,8 @@
|
||||
// Read-only authenticated/antiforgery denial checks; Development disposable identity required.
|
||||
const {chromium}=require('playwright'),fs=require('fs'),assert=require('assert/strict');
|
||||
(async()=>{const b=await chromium.launch();try{assert(process.env.PD_CONTEXT_SCOPE&&process.env.PD_CONTEXT_IDENTITY,'Explicit disposable Development inputs required');const s=JSON.parse(fs.readFileSync(process.env.PD_CONTEXT_SCOPE)),who=JSON.parse(fs.readFileSync(process.env.PD_CONTEXT_IDENTITY));assert.equal(who.Database,'PlotDirector_Development');assert.equal(who.UserID,s.user);assert(who.Email.startsWith('pwa-browser-'));const base='https://dev.plotdirector.com',unauth=await b.newContext(),auth=await b.newContext();const login=await auth.newPage();await login.goto(base+'/Account/Login');await login.locator('[name=Email]').fill(who.Email);await login.locator('[name=Password]').fill(who.Password);await Promise.all([login.waitForURL(u=>u.pathname!='/Account/Login'),login.locator('button[type=submit]').click()]);const path=`/Writing/Context/EditCharacter?bookId=${s.book}&sceneId=${s.scene}&characterId=${s.characters[0]}&field=description`;
|
||||
assert([302,401].includes((await unauth.request.get(base+path,{maxRedirects:0})).status()));
|
||||
for(const [url,status] of [[path.replace('field=description','field=emotion').replace('sceneId='+s.scene,'sceneId=2147483647'),403],[path.replace('characterId='+s.characters[0],'characterId=2147483647'),403],[path.replace('bookId='+s.book,'bookId=2147483647'),403],[path.replace('&field=description',''),400],[`/Writing/Context/EditRelationship?bookId=${s.book}&sceneId=${s.scene}&relationshipId=2147483647`,403]]){const response=await auth.request.get(base+url,{maxRedirects:0});if(status===403&&response.status()===302)assert.equal(new URL(response.headers().location,base).pathname,"/Account/AccessDenied");else assert.equal(response.status(),status);}
|
||||
assert.equal((await auth.request.post(base+'/Writing/Context/EditCharacter',{form:{BookID:s.book,SceneID:s.scene,CharacterID:s.characters[0],Field:'description',Value:'Must never persist'}})).status(),400);
|
||||
assert.equal((await auth.request.post(base+'/Writing/Context/EditRelationship',{form:{BookID:s.book,SceneID:s.scene,Notes:'Must never persist'}})).status(),400);
|
||||
console.log('PASS Development HTTP security: unauthenticated form denied; foreign book/scene/character/relationship IDs denied; missing field rejected; both mutation endpoints enforce antiforgery. No changes persisted.');}finally{await b.close();}})().catch(e=>{console.error(e.message);process.exitCode=1;});
|
||||
Loading…
x
Reference in New Issue
Block a user