Europass import: whether a telephone number is already on the instance is answered without spending the #142 allowance #615
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#615
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, following every caller ofphone_numbers.taken_elsewhereand checking which of them charge the answer to the account.Checked again on 2026-10-01 against
mainat0a5cad587: still present. The code is now atcore/phone_numbers.py:170-184(collision_noticed) andcore/phone_numbers.py:149-167(collision_message);resume/importing.py,resume/views.pyandresume/candidate.pyare where they were. #333 (open) describes the same unspent question on the plugin surface, not this path.#142 bounded how often one account may learn that a telephone number is already recorded somewhere on the instance: each such answer spends one unit of
POSTULO_NUMBER_RATE(20 an hour by default) throughphone_numbers.collision_noticed. The profile form, the contact form, the API and the candidate-file importer all spend it. The Europass writer does not:importing.applyaskstaken_elsewhereand quietly skips a taken number, and whether the number then appears on the person's profile gives the same answer for free.resume/importing.py:150-160(apply:if (number and phone_numbers.primary_for(profile) is None and not phone_numbers.taken_elsewhere(number)):), reached fromresume/views.py:473-481(EuropassImportView._write); the allowance iscore/phone_numbers.py:193-207(collision_noticed), spent bycollision_message(:172-190) and byresume/candidate.py:841-866(_somebody_elses).POSTULO_NUMBER_RATE="2/h"and a number held by another account, ten calls ofimporting.applywith that number wrote nothing and spent nothing:collision_messageafterwards still gave the "already recorded on this instance" answer rather than the "asked too often" one. A free number was written. So an account with no number of its own can import a Europass file carrying the number in question, look at Your details, remove whatever was added, and repeat, without ever meeting the hourly bound.importing.apply, when the file's number is taken elsewhere, callphone_numbers.collision_noticed(owner)ascandidate._somebody_elsesdoes; once it raisesthrottle.TooOften, stop answering for numbers in that import. Say what happened inReport.skipped, which the view already shows, in the words the form uses (ALREADY_IN_USE, orASKED_TOO_OFTENonce spent), and keep the rest of the import.Done when
tests/security/test_candidate_file.py's manner (or a newtests/security/test_europass_import.py) withPOSTULO_NUMBER_RATE="2/h"shows that repeated Europass imports carrying a taken number spend the allowance, and that once it is spent a free number is not written either and the import reports the limit.