Skip to content
  • Mike Boyer's avatar
    Add random-token authentication to the web IDE · 00f6df89
    Mike Boyer authored
    
    
    pyide_web.py had no authentication at all -- under the default
    127.0.0.1 bind, the realistic exposure isn't a network attacker but any
    other webpage open in the same browser reaching /api/run, file
    read/write, and the debug session (old browsers like Pale Moon predate
    the newer same-origin protections that partially block this). Same
    class of bug Jupyter notebooks had before they added a token.
    
    Cookie-based (SameSite=Strict, HttpOnly, session-only) specifically so
    the frontend needs zero changes -- the query-string token in the
    startup URL is only ever needed on the first page load. On by default;
    --token/PYIDE_TOKEN pin it, --no-auth disables the check entirely.
    
    Co-Authored-By: default avatarClaude Sonnet 5 <noreply@anthropic.com>
    00f6df89