Skip to content

Security fixes + CRUD OpenAPI + minor layout fixes - #26

Merged
SanderNielen merged 3 commits into
mainfrom
security-fixes
Nov 18, 2026
Merged

SanderNielen merged 3 commits into
mainfrom
security-fixes

Conversation

@FDonati

@FDonati FDonati commented Nov 17, 2026

Copy link
Copy Markdown
Member

No description provided.

- API and web views require login; users only see their own production lines
- Published DPPs public read-only; DSS sessions use random UUIDs
- Upload type/size checks; fix XSS in popup response
- Remove unused API views; add access-rule tests
- Serve the OpenAPI schema at /schema/, with Swagger UI at
  /schema/swagger/ and ReDoc at /schema/redoc/
- Group the /api/ routes into tagged sections (ROUTE_GROUPS)
- Add schema tags, requests and responses to the DSS views

Fixes:
- DocumentSerializer: rename get_document_url to get_file_url, so
  that file_url returns an absolute URL; add a test
- Add www.l4m-dss.eu to the default ALLOWED_HOSTS

Layout:
- Welcome page: use the dpp base template (sidebar, breadcrumbs,
  footer); restyle the production-line table and buttons
- dpp base template: use the 'dpp:' namespace in the sidebar links,
  so that pages without 'opts' in the context can use it
- Login page: centered box, crispy form fields, links to password
  reset and sign-up; keep the 'next' redirect
- Shared base template: move the stylesheet into <head> and the
  header into <body>

Dependencies and config:
- Add drf-spectacular; replace psycopg2 with psycopg2-binary
- Ignore .vscode/
- Add drf-spectacular; use psycopg2-binary
- Shared schema enum names (api/schema_enums.py, ENUM_NAME_OVERRIDES)
- Rename DSS MaterialSerializer to WeldMaterialSerializer
- Ignore .vscode/
Comment thread mysite/api/serializers.py
fields = ['file', 'type', 'issuer', 'instructions', 'language', 'issue_date', 'expiry_date', 'file_url']

def get_document_url(self):
def get_file_url(self, document: Document) -> str:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure when you forked, but the main branch already has this changed already.

@SanderNielen
SanderNielen merged commit 06b6bf6 into main Nov 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants