893 Commits

Author SHA1 Message Date
Klaas van Schelven 57e0dd3747 System check for CsrfViewMiddleware: turn off; we have our own 0.1.11 2024-10-02 16:39:22 +02:00
Klaas van Schelven 8c09c68ecd Users: some interface to edit/view them 2024-10-02 15:41:42 +02:00
Klaas van Schelven 8ee526776e Show 'no version' on a button when this applies 2024-09-30 21:22:34 +02:00
Klaas van Schelven 10f63830ba Implement version-string sanitizing 2024-09-30 21:11:42 +02:00
Klaas van Schelven 19e07a93ce remove part of comment
this part of the comment is well-covered by the current version of the
docs (https://www.bugsink.com/docs/releases/)
2024-09-30 21:06:58 +02:00
Klaas van Schelven 87a9fb99ac Faulty newline in docker.py.template 0.1.10 2024-09-30 13:13:18 +02:00
Klaas van Schelven f2cd88032e Use verbose_csrf_middleware
this should make it so that you get the debug information right at the moment
you're experiencing the problem (rather than having to go to a special page)
2024-09-29 20:19:32 +02:00
Klaas van Schelven a169c201c0 Add note about HTTP_X_FORWARDED_PROTO
As per https://code.djangoproject.com/ticket/35800
2024-09-28 00:10:36 +02:00
Klaas van Schelven 53ea7eb3d7 Don't recommend USE_X_FORWARD_HOST
As in the website, where we said "Don't recommend X-Forwarded-Host"

We recommend just setting 'Host' in the production-installation guide,
so using X-Forward-Host is actually _wrong_.

I'd rather use Host than X-Forward-Host, it's much more straightforward.
here's a question on SO, which has answers, but I don't see any reason
there to not just use Host (in fact I understand none of the answers):
https://stackoverflow.com/questions/19084340/real-life-usage-of-the-x-forwarded-host-header
2024-09-28 00:09:02 +02:00
Klaas van Schelven f67ca08080 Document what a 'sort_epoch' is 2024-09-27 21:27:44 +02:00
Klaas van Schelven 5e5b53abed Remove a false comment
(groupings do imply issues, it's a FK)
2024-09-27 18:14:51 +02:00
Klaas van Schelven b6b4083ac1 Move vendored code into explicitly licenced dir 2024-09-27 18:03:51 +02:00
Klaas van Schelven 390048e2cd Comments/docstrings 2024-09-27 17:56:42 +02:00
Klaas van Schelven 6f0493f685 Resolved issues: italic & checkbox
in the lists; this is easier to read than a strikethrough.
I experimented with text-decoration-style and text-decoration-style but that
didn't make it better.
Our big brother doesn't bother to reveal the resolvedness of issues in lists
_at all_, btw. Surprising!
2024-09-27 12:16:25 +02:00
Klaas van Schelven a899be8cd5 Order events on event_list page
Paginator's Warning inspired me to do so
2024-09-26 16:18:29 +02:00
Klaas van Schelven 9db0b121ec Further HTML correctness checks; by not going through Firefox a few more issues were unhidden 2024-09-26 16:14:51 +02:00
Klaas van Schelven 35292d0ceb Replace "<a name" elements w/ id=...
Multiple problems w/ <a name

* in itself deprecated
* my approach of self-closing <a is illegal too

replaced w/ spans where necessary.

Further notes:

'topp' was never used; '#top' is taken too, so I went with first-frame (stil unused, 'maybe later')

The fixes in this and preceding commits were inspired by running "Nu Html Checker"

docker run -it --rm -p 8888:8888 ghcr.io/validator/validator:latest

files were simply saved in Firefox and then uploaded; make sure to ignore the warning which is caused by Firefox:

> A document must not include both a meta element with an http-equiv attribute whose value is content-type, and a meta element with a charset attribute.

I limited checking to the issue-list and various event-detail pages.
2024-09-26 15:58:42 +02:00
Klaas van Schelven b43d1cfa05 action must be non-empty 2024-09-26 15:27:46 +02:00
Klaas van Schelven f450bf6c29 Add 'alt' to img 2024-09-26 15:25:18 +02:00
Klaas van Schelven eafdcfdf32 Alert: truncate the individual parts
this way, for a long issue.title, you still see what the project context is
2024-09-26 15:06:24 +02:00
Klaas van Schelven 336e126e3e Event-list: pagination 2024-09-26 10:39:36 +02:00
Klaas van Schelven e83d1b8290 Fix bottom menu separators (for the non-event, yes-admin case) 2024-09-26 09:57:31 +02:00
Klaas van Schelven fd79706c54 Search (TSTTCPW approach) 2024-09-25 14:49:05 +02:00
Klaas van Schelven bbe244c95d No {{ state_filter }} issues found logic 2024-09-25 14:30:28 +02:00
Klaas van Schelven 6f86a16f12 Don't hide project-related icons on bottom RHS for issue-list when issue-list empty
in fact, that situation may very well be one where you care about those icons
2024-09-25 14:22:39 +02:00
Klaas van Schelven 01570121d9 Typo in tailwind class 'ext' -> 'text' 2024-09-25 14:15:59 +02:00
Klaas van Schelven 1b689aeedb CSRF_DEBUG setting in Docker image 2024-09-25 09:00:50 +02:00
Klaas van Schelven ed9a801ab5 DEBUG_CSRF setting for the debug view 0.1.9 2024-09-23 14:32:12 +02:00
Klaas van Schelven 40a867c811 CSRF_TRUSTED_ORIGINS extra test added 2024-09-23 14:20:26 +02:00
Klaas van Schelven dc5c36ac52 CSRF debug tools 2024-09-23 14:08:06 +02:00
Klaas van Schelven 50b21d2844 Run with -Wall 2024-09-19 17:00:29 +02:00
Klaas van Schelven 0400f09d55 .github workflow tests: run those using the packaged wheel 2024-09-19 16:57:09 +02:00
Klaas van Schelven 80a3d5c347 Add generated code to flake8 ignore list 2024-09-19 15:06:51 +02:00
Klaas van Schelven c50ae7afe7 Pin sample to test
on github.com the glob evaluated such that the sample could not be
modified according to the test-setup
2024-09-19 15:01:07 +02:00
Klaas van Schelven b2b63c9664 Use precompiled event_schema.py 2024-09-19 14:57:47 +02:00
Klaas van Schelven 8f0985cbe5 fastjsonschema: don't touch my data please!
I'm sure this can be useful, but since I validate before storing, this is just
a ReallyBadIdea(TM). For one, it makes it so that running with different settings
of VALIDATE_ON_DIGEST leads to different data in the DB
2024-09-19 13:46:13 +02:00
Klaas van Schelven f90ce561a1 pygmentize: deal with None as a value for pre_context/post_context
according to spec, this is possible (though I did not yet observe it in the data).
the need for this was exposed when introducing fastjsonschema, which (by default)
fills in all keys with their default values (None for pre_context/post_context)
2024-09-19 13:44:36 +02:00
Klaas van Schelven 096d1f7d9a Add 'samples' tests as such explicitly 2024-09-19 13:10:13 +02:00
Klaas van Schelven 9fa5d97d04 VALIDATE_ON_DIGEST rename (is more precise) 2024-09-19 13:09:59 +02:00
Klaas van Schelven ff37e8f40c Remove 'understandable_json_errors utils
turns out it already exists (best_match)
2024-09-19 12:39:06 +02:00
Klaas van Schelven febbbc67c7 Use fastjsonschema for validation 2024-09-19 12:17:41 +02:00
Klaas van Schelven d0eb6bea95 Validation: ignore the '_meta' property
we've observed that this is sent-in-practice. we don't want to
actually remove it from the stored data, so we remove it only
from the thing we validate (not the actual data)
2024-09-19 11:20:08 +02:00
Klaas van Schelven fe9aba5c7d Add (optional) input validation using JSONSchema 2024-09-19 10:14:00 +02:00
Klaas van Schelven 618e4c43b2 Don't 'manually revert' on failure, this is what we have transactions for
and in fact doing a manual revert leads to a TransactionManagementError
2024-09-19 09:23:10 +02:00
Klaas van Schelven 9eed504474 test: raise exception when invalid data is present 2024-09-19 09:21:15 +02:00
Klaas van Schelven f2a78fed9d Use the envelope's event_id when using the envelope endpoint
* As per the spec 'takes precendence'
* Also fixes the reported bug on Laravel, which apparently doesn't send event_id
  as part of the event payload.
* Fixes the envelope tests (they were doing nothing when I moved the
  data samples around recently)
* Adds a 'no event_id in data, but yes in envelope' test to that test.
* Adds handling to send_json such that we can send envelopes when the event_id
  is missing from the event data.
2024-09-18 11:36:47 +02:00
Klaas van Schelven f4bbf0c386 Rewrite comment for understanding 2024-09-18 10:24:44 +02:00
Klaas van Schelven 8b7a8dbac5 Clarify a comment 2024-09-18 10:11:00 +02:00
Klaas van Schelven 1b6d17c947 Fix: when the first event of a new release is a regression, detect it
not detecting it was caused by incongruency between in-memory and serialized states of the data
2024-09-18 09:08:59 +02:00
Klaas van Schelven c99702d046 Comment about why a patch function is used 2024-09-18 08:55:17 +02:00