Commit Graph
3295 Commits
Author SHA1 Message Date
f8cc31b120 Order-level questions (#6471)
* New CheckoutSession model, created and deleted throught cart lifetime but only used for order-level question answers so far
* Order-level QuestionAnswers (relations to CheckoutSession / Order)
* New container_type field on Question model to specify whether Question belongs to order or orderposition
* Order-level questions are currently experimental, UI is hidden behind feature flag

---------

Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
2026-08-14 14:56:45 +02:00
c4a5a9a84d BasePaymentProvider & PayPal2: allow to cancel pending payments on a per payment basis (Z#23240966) (#6472)
* move payment into pending on PENDING_REVIEW webhook

* mark approved payment as pending

* extend BasePaymentProvider to gate aborting pending payments on a payment per payment basis

* add timeout to paypal after which a pending payment can be canceled

* formatting

* add missing negation

* cleanup abort_pending_allowed methods

* Apply suggestions from code review

Co-authored-by: pajowu <pajowu@pajowu.de>

* check all capture elements

* rename method and change defaults

* remove left over Constant

* flake8 .

---------

Co-authored-by: pajowu <pajowu@pajowu.de>
2026-08-13 17:28:54 +02:00
Kara Engelhardtandpajowu 4e5fbacf6d Replace deprecated redis setex call 2026-08-13 16:59:42 +02:00
7fe31634e6 Allow RelativeDate in relation to a moment of order (#6160)
* initial implementation

* factor out _resolve_base_date

* add js to prevent illegal inputs

* fix tests

* Update src/pretix/base/reldate.py

Co-authored-by: Raphael Michel <michel@pretix.eu>

* Apply suggestions from code review

Co-authored-by: Raphael Michel <mail@raphaelmichel.de>

* move js includes of to fragment_js.html

* add type annotations

* moves logic from RelativeDateWrapper into RelativeDate and adds BaseChoice for configuring which models attributes support which relationship

* fix tests

* test upgrade behaviour

* Apply suggestions from code review

Co-authored-by: Raphael Michel <mail@raphaelmichel.de>

* move reldate.js include in correct file

* add OptionAttrsSelect to allow select options with their own attributes per value

* add a little bit of information to the tests for future reference

* rewrite reldate.js use data-attributes

* general cleanup

* add test for order.subevents cases

* use correct choice format

* remove order.subevent variants

* various cleanup

* Apply suggestions from code review

Co-authored-by: Raphael Michel <mail@raphaelmichel.de>

* remove empty docstrings

* add depreciation warning

* change event listener to pretix:bind-forms

---------

Co-authored-by: Raphael Michel <michel@pretix.eu>
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
2026-08-12 15:37:29 +02:00
f25c233e91 Fix performance issues in download reminder (#6393)
* Fix performance issues in download reminder

* Update src/pretix/base/services/orders.py

Co-authored-by: Richard Schreiber <schreiber@pretix.eu>

* Fixes after review

* Fix check in loop

---------

Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
2026-08-10 16:13:54 +02:00
Raphael MichelandGitHub d08216d8c5 API: Allow to simulate check-ins (#6360)
* API: Allow to simulate check-ins

* Add missing file
2026-08-07 18:59:01 +02:00
Raphael MichelandGitHub ea792e76b2 Device list: Show online status (#6455)
* Device list: Show online status

* Fixes post-review
2026-08-06 09:07:20 +02:00
Raphael MichelandGitHub 8133061fe1 Devices: Store timestamp of last contact (#6453) 2026-08-05 10:57:13 +02:00
Raphael Michel 288ac50600 Merge branch 'html-injection-placeholder' into 'master'
Prevent HTML injection in email preview (Z#23241741)

See merge request pretix/pretix!47
2026-08-05 10:56:46 +02:00
Raphael Michel e7657a3dd3 Prevent HTML injection in email preview (Z#23241741) 2026-08-05 10:56:46 +02:00
pajowuandGitHub 01d736361d Cart Manager: Round custom price to currency when adding (#6426) 2026-08-03 14:26:57 +02:00
Raphael MichelandGitHub f3ffce4e5b Question form: Allow to unset required boolean questions (Z#23239887) (#6382)
Proper fix for #6366
2026-07-28 10:59:34 +02:00
Raphael MichelandGitHub 47b632eabe RejectInvalidInputMiddleware: Ignore invalid charsets on body (#6314) 2026-07-28 09:07:16 +02:00
Raphael MichelandGitHub 1ff9742a08 Customer export: Add memberships tab (Z#23228422) (#6253) 2026-07-28 09:06:45 +02:00
Kara Engelhardtandpajowu 6d62284d87 Add global id field to order 2026-07-27 13:22:42 +02:00
Raphael MichelandGitHub 92e7069a8e Improve performance of overpayment checks (Z#23241035) (#6410)
* Improve performance of overpayment checks

* Upgrade django-scopes
2026-07-24 13:42:33 +02:00
Raphael Michel 9fd570a53d Add cautionary comment about vobject bug 2026-07-22 14:49:53 +02:00
Raphael MichelandGitHub 003bfb707d Fix scoping for OrderPosition.objects (follow-up to #4278) (#6407) 2026-07-22 14:10:34 +02:00
Richard Schreiberandpajowu baf3cf04ec fix import and missing license-header 2026-07-21 18:39:07 +02:00
Kara Engelhardtandpajowu fa2009ed03 Add central helper for ssrf address protection 2026-07-21 18:39:07 +02:00
luelistaandGitHub cc082e2001 Improve CSP handling in vite integration; refactor CSP handling into helper functions (Z#23240534) (#6387) 2026-07-21 13:20:31 +02:00
Raphael MichelandGitHub d47c435489 LocaleMiddleware: Always render error pages in cookie or browser language (#6277) 2026-07-20 15:18:14 +02:00
Raphael MichelandGitHub ea819530f9 Escape HTML arguments to translation strings (#6399) 2026-07-20 13:15:09 +02:00
Raphael MichelandGitHub 09aef94376 Vouchers: Fix race condition that allows budget to be exceeded (#6396) 2026-07-20 13:14:49 +02:00
Kara Engelhardtandpajowu 214ea5fcd3 Show end time in subevent list (Z#23237612) 2026-07-20 12:00:22 +02:00
Raphael Michel 2de032c2be Fix test failure on PostgreSQL 2026-07-17 19:22:50 +02:00
Raphael Michel 2574b31afd Fix unused import 2026-07-17 18:44:33 +02:00
5f2264daeb User email verifications: Add rate limiting (Z#23232834) (#6219)
* User email verifications: Add rate limiting (Z#23232834)

Also, refactor rate limiting into a central utility

* Make ip block work in dev

* Review notes

* Update src/pretix/base/forms/user.py

Co-authored-by: luelista <weller@rami.io>

* Apply suggestions from code review

Co-authored-by: luelista <mira@teamwiki.de>

* Add rate limit reset

---------

Co-authored-by: luelista <weller@rami.io>
Co-authored-by: luelista <mira@teamwiki.de>
2026-07-17 18:35:03 +02:00
Raphael MichelandGitHub 49247062bc Drop second component from many time picker fields (#6150) 2026-07-17 17:42:51 +02:00
luelistaandGitHub 71488f0a02 Fix migration conflict (#6388) 2026-07-16 17:07:25 +02:00
52a4381277 Enforce uniqueness of EventMetaProperty names in DB (Z#23231419) (#6106)
After enforcing this on application level in commit 4c37351, we can now also add
a unique constraint on DB level and a migration to fix any left over non-unique entries.

---------

Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
2026-07-16 15:44:58 +02:00
luelistaandGitHub bf066909a7 Remove more usages of |safe (#6363)
* Replace |safe with |escapejson where appropriate
* Use JSON encoding for data-replace-with-qr
2026-07-16 13:14:37 +02:00
7cff4321e0 Order change: Fix crash if addon has hidden_if_item_available (Z#23236380) (#6357)
* Fix crash in rebooking if addon has hidden_if_item_available
* Move get_grouped_items into its own file and rename to prepare_item_list_for_shop
  (but keep a reference under original name for plugin compatibility)
* Make Item[Variation].unavailability_reason helper functions next to get_grouped_items
* Use current_unavailability_reason attribute instead of unavailability_reason()
* Add test case for:
  Order has product with addon 1; Addon 1 is hidden if Addon 2 is available; When order is changed, Addon 1 should not be removable
* Fix special case if addon product is now set to require a voucher (vouchers for addons are not supported)

---------

Co-authored-by: Kara Engelhardt <engelhardt@pretix.eu>
2026-07-16 12:52:08 +02:00
luelistaandGitHub fe5d095ae7 Prevent changing ticket secret of gift-card-issuing order positions (#6281) 2026-07-16 12:41:27 +02:00
Raphael Michel 2660dfe1bc CSP: Hotfix connect-src to allow static file access for PDF editor 2026-07-16 10:23:44 +02:00
Gerasimos ChourdakisandGitHub 6901ed8b26 Event settings: Improve wording of help message for is_remote (#6386) 2026-07-15 17:46:15 +02:00
eb29101d09 Allow more decimal places for tax rates (#6092)
* Allow more decimal places for tax rates

* Fix normalization

* More tax rate handling

* Add uncommitted tests

* Rebase migration

* Update src/pretix/base/migrations/0304_tax_rate_decimals.py

Co-authored-by: robbi5 <richt@rami.io>

---------

Co-authored-by: robbi5 <richt@rami.io>
2026-07-15 16:20:45 +02:00
Raphael MichelandGitHub 4a4cff3c41 Drop all csp_ignore statements from core (except stripe, for now) (#6337)
* Add proper CSP policy for HTML email preview

* Handle safe types centrally

* Precompile schema validation function to get rid of ajv2020

* Fix tests

* adjust more tests
2026-07-15 09:39:42 +02:00
Raphael MichelandGitHub ffca102a8a Question form: Do not store invalid False values for required boolean questions (Z#23239887) (#6366) 2026-07-10 16:42:10 +02:00
76e6803eac Fix customer views using wrong csrf middleware (#6027)
* Fix customer views using wrong csrf middleware

This lead to persistent csrf validation errors if the token from the cookie expired, which could only be solved by clearing cookies.

* Remove unneccesary csrf_protect decorators

* Fix typo

Co-authored-by: Raphael Michel <michel@pretix.eu>

---------

Co-authored-by: Raphael Michel <michel@pretix.eu>
2026-07-10 13:25:40 +02:00
15c194c0a3 Add base class for historical payment providers (#6336)
* Add base class for historical payment providers

* Update src/pretix/base/payment.py

Co-authored-by: pajowu <engelhardt@pretix.eu>

---------

Co-authored-by: pajowu <engelhardt@pretix.eu>
2026-07-10 11:10:32 +02:00
luelistaandGitHub 430c6dd269 Use SafeStrings for plugin signals returning HTML that should be rendered (#6343)
As a security precaution, we change the contract of some signals such that a 
SafeString needs to be returned if HTML should be rendered without further 
escaping.

Before, the `{% signal ... %}` and `{% eventsignal ... %}` template tags 
called mark_safe themselves on all strings returned from signals. That could
lead to unsafe coding practices, where untrusted values are interpolated into
HTML format strings. However, such interpolations should usually be performed 
using helpers such Django's format_html, which automatically escapes inputs
and returns a SafeString.
Now, we call conditional_escape on signal results, so that any HTML not explicitly
marked as safe gets escaped.

Most plugins are not affected by this change as they return a SafeString as a 
result of Template.render already.
2026-07-09 17:50:26 +02:00
Raphael Michel 6411648457 Revert "Update redis requirement from ==7.4.* to ==8.0.* (#6226)"
This reverts commit 005b3864b1.
2026-07-09 00:45:32 +02:00
dependabot[bot]GitHubluelistadependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Raphael MichelRaphael Michel
005b3864b1 Update redis requirement from ==7.4.* to ==8.0.* (#6226)
* Update redis requirement from ==7.4.* to ==8.0.*

Updates the requirements on [redis](https://github.com/redis/redis-py) to permit the latest version.
- [Release notes](https://github.com/redis/redis-py/releases)
- [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES)
- [Commits](https://github.com/redis/redis-py/compare/v7.4.0...v8.0.0)

---
updated-dependencies:
- dependency-name: redis
  dependency-version: 8.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Remove setex calls

* Update src/pretix/presale/views/user.py

Co-authored-by: luelista <weller@rami.io>

* Fix tests

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raphael Michel <michel@pretix.eu>
Co-authored-by: Raphael Michel <michel@rami.io>
Co-authored-by: luelista <weller@rami.io>
2026-07-08 12:07:54 +02:00
14c3baa2aa Drop nullability on Order.organizer and OrderPosition.organizer (#4278)
* Drop nullability on Order.organizer and OrderPosition.organizer

* Rebase migration and add autoclean

* Utilize new relationship for scopes

* Declare reverse noop

* Update src/pretix/base/migrations/0302_resolve_duplicate_codes_and_secrets.py

Co-authored-by: Martin Gross <gross@rami.io>

* Update src/pretix/base/migrations/0302_resolve_duplicate_codes_and_secrets.py

Co-authored-by: Martin Gross <gross@rami.io>

---------

Co-authored-by: Martin Gross <gross@rami.io>
2026-07-07 17:44:19 +02:00
dc1b62fc56 Vouchers: Allow to bulk-update (#6096)
* Vouchers: Allow to bulk-delete larger numbers

* [DRAFT] voucher bulk update

* untested draft

* Minor fixes

* some tests and fixes

* More tests

* Bulk vouchers - refactor (#6353)

* Reuse parse_itemvar from VoucherForm

* Refactor: Method for _bulk update check

* remove unused parameter

* Refactor: Deduplicate get_affected_quotas code

* Remove unused delete button

* Prevent accidental update of *all* vouchers (cf PR #4960)

* Make sure we actually edit the selected items

* Use dataclass for bulk-edit data, deduplicate quota-blocking logic

* Move dataclass to models.py

* Fix linter errors

* Fix tests

* Fix tests

---------

Co-authored-by: luelista <weller@rami.io>
2026-07-07 17:03:25 +02:00
Raphael Michel 2bd5e90a86 Fix isort 2026-07-07 15:43:00 +02:00
Raphael Michel 8095134400 Add query tagging for periodic tasks 2026-07-07 14:55:32 +02:00
Raphael MichelandGitHub 7732794317 Do not use redis cache at import time (#6321)
During our [2026-06-27 incident](https://pretix.eu/about/en/blog/20260630-pretix-hosted-outage/),
we noticed that pretix is using redis at import time. This means that
gunicorn and celery process were unable to start on servers who could
currently not reach redis. This is kinda mitigated through auto-restart
on systemd or docker level, but that's not really how it is supposed to
work. Celery even has smart retry/reconnect logic that becomes pointless
this way.
2026-07-07 10:47:12 +02:00
dd2a74557d Add contact URL setting (#6132)
* Add contact URL setting

* Apply suggestions from code review

Co-authored-by: Raphael Michel <mail@raphaelmichel.de>

* Apply suggestion from @raphaelm

---------

Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
2026-07-06 17:49:55 +02:00