fix(api): запретить подделку privacy_accepted_at через customer/add#439
Open
Ibochkarev wants to merge 1 commit into
Open
fix(api): запретить подделку privacy_accepted_at через customer/add#439Ibochkarev wants to merge 1 commit into
Ibochkarev wants to merge 1 commit into
Conversation
GDPR consent timestamp must only be set server-side during register. customer/add already forbade privacy_ip but still allowed forging privacy_accepted_at via fieldMeta.
Ibochkarev
force-pushed
the
fix/issue-413-privacy-accepted-at-forbidden
branch
from
July 24, 2026 02:17
bca93f2 to
b7d9698
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Описание
POST /api/v1/customer/addписал любое поле изfieldMeta, кроме denylist. В списке былprivacy_ip, но неprivacy_accepted_at— авторизованный покупатель мог проставить GDPR-метку согласия без register/consent flow.privacy_accepted_atдобавлен вPROFILE_QUICK_UPDATE_FORBIDDEN. Легитимный consent по-прежнему только вRegisterService(серверный timestamp + IP).Тип изменений
Связанные Issues
Closes #413
Как это было протестировано?
composer ci:php)Конфигурация тестирования:
fix/issue-413-privacy-accepted-at-forbiddenСкриншоты (если применимо)
Чеклист
Дополнительные заметки
msCustomerиз customer/add API должен поддерживать extra fields msCustomer #261) — отдельный hardening, не scope [Bug] Web API: customer/add позволяет подделать privacy_accepted_at #413.PUT /customer/profileи так пишет только name/email/phone.