summaryrefslogtreecommitdiff
path: root/index.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *.go: Update commentsRunxi Yu2024-10-091-5/+0
|
* {courses,index}.go, student.html, style.css: Group by course groupRunxi Yu2024-10-091-9/+18
|
* index.go, {login,student}.html: Use structs rather than maps for tmplRunxi Yu2024-10-091-17/+23
|
* *.go: Use sync.Map instead of map[int]*courseT for coursesRunxi Yu2024-10-091-3/+20
| | | | I'm not sure whether this is actually better than locking.
* *.go: Limit to approximately 80 characters per lineRunxi Yu2024-10-061-3/+18
|
* index.go, login.html: Improve looks of session expired messageRunxi Yu2024-10-061-1/+1
|
* *: Overhaul structure again and embed everythingRunxi Yu2024-10-061-0/+117
| | | | | | | | - Remove sub-Makefiles; recursive make is annoying - Just use one top-level Makefile that builds everything - Embed templates and minified static resources into the binary - Embed all compiled documentation into the binary and serve - Embed all source into the binary and serve
* *.go: Move to backendRunxi Yu2024-10-051-120/+0
| | | | And adjust Makefiles, admin handbook, and lint.sh accordingly.
* index.go, *.html: index->student, index_login->loginRunxi Yu2024-10-021-3/+3
| | | | | | | The new names are a bit more descriptive in what each do, and I intend to add an "admin" template in the future. This has no user-facing effects.
* index.go, ws.go: Fix race condition surrounding coursesRunxi Yu2024-10-011-12/+16
| | | | | | handleIndex and handleConn used to access the courses map without RLock'ing coursesLock, which may cause issues if courses is being written to, by a function such as setupCourses.
* {config,index}.go, cca.scfg.example, style.css, *.html: Link to sourceRunxi Yu2024-09-301-0/+3
|
* *: Change license to AGPL-3.0-or-laterRunxi Yu2024-09-301-21/+11
|
* index.go: Correct typoRunxi Yu2024-09-301-1/+1
|
* {auth,index,ws}.go, schema.sql: Move session cookie into the user tableRunxi Yu2024-09-301-21/+6
| | | | | | | One user shall only have one session at a time. This reduces the possibility of strange race conditions and simplifies the code a lot. References: https://todo.sr.ht/~runxiyu/cca/4
* {auth,index,ws}.go: Add contexts for database callsRunxi Yu2024-09-261-3/+2
|
* *.go: LintingRunxi Yu2024-09-241-16/+14
|
* {index,utils,ws}.go: Handle write errorsRunxi Yu2024-09-241-30/+6
|
* {utils,auth,index,ws}.go: Handle errors in random number generationRunxi Yu2024-09-241-2/+12
|
* *.go: Add more licensesRunxi Yu2024-09-091-0/+30
|
* *.go: Shorter line lengthsRunxi Yu2024-09-091-2/+10
|
* *.go: Add commentsRunxi Yu2024-09-091-2/+12
|
* *: Display coursesRunxi Yu2024-09-081-0/+1
|
* *.go: Simplify error messages and reformatRunxi Yu2024-09-081-1/+1
|
* *: Basic WebSocket connection may be established nowRunxi Yu2024-09-081-0/+1
|
* *: Call Graph API for department informationRunxi Yu2024-09-071-1/+3
| | | | | | | | | | | | I am using a hybrid flow with "id_token" for OpenID Connect and "code" for an Authorization Code. I would use "token" too but that doesn't seem to be supported for standard web-apps and could result in strange session-hijacking issues. We still need PKCE sometime in the future; however it's not a priority: the worst attack someone could pull off is to use a different user's Authorization Code and steal a Department, which probably isn't too big of a deal as the Authorization Code should be secret anyways.
* *: Basic authentication and templatesRunxi Yu2024-09-071-0/+103
These are imported from FBFP and slightly modified to be specific to YKPS (while not being hard to port to other environments that use APIs that use OAUTH 2.0). Some code is also simplified. Database code still needs an audit, and things are not tested yet.