code wiki / _hdl_build / nx_cms_redirect_gate.nx

nx_cms_redirect_gate.nx

buildroot/runtime/_hdl_build/nx_cms_redirect_gate.nx

2824 B44 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic cms
docsdependenciesstructsconstsfunctions

about

nx_cms_redirect_gate.nx -- CMS REDIRECTS gate (land a missing class HONESTLY). Proves the team's real redirect organs AS A CMS CAPABILITY: RFC 7231 status codes per redirect kind (nx_http_redirect) + the safe-location guard that REJECTS CRLF/NUL header-injection in a Location (the security exceed over WP redirect plugins, which have had open-redirect/header-injection CVEs). Writes CMSGATE redirects-404 verdict=PASS to cms_gate.log ONLY if all assertions hold (no fake-green).

dependencies 3 imports · 0 importers

nx_http_redirect.nx nx_http_resolve_redirect.nx nx_syscalls.nx nx_cms_redirect_gate.nx

imports: nx_http_redirect.nxnx_http_resolve_redirect.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nxr_kind_status_code _redirect_location_is_safe dg_len sys_mmap dg_puts sys_write dg_num sys_mmap ↻ sys_write ↻ sys_openat_append sys_write ↻ sys_close sys_exit

structs

none

consts

none

functions

10func dg_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
11func dg_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: main
12func dg_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=48+(m%10);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
14func main() -> i64