Your career → Other languages: any string is taken as a language and saved, however long #620
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#620
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, reading the translation screen and trying it against the test settings.Related to #337.
Checked again on 2026-10-01 against
mainat0a5cad587: still present. The cited lines have not moved. The language rules (normalise,TRANSLATABLE) are now inresume/translatable.py, whichtranslatingstill hands out (#248), so the shared check named in the fix belongs there.The screen that translates a career entry takes its language from
?language=or the postedlanguageand saves under whatever it is given. It only lowercases the value and replaces underscores.AddLanguageFormoffers the valid choices but nothing uses it to check a value. The candidate-file importer checks the same value againstLANGUAGE_TAGand a 10-character limit; this screen does neither.resume/views.py:174-175(ResumeItemTranslationsView.chosen_language), used byget(:211) andpost(:223);resume/forms.py:266-289(TranslationForm.save);resume/models.py:363(Translation.language,max_length=10); compareresume/candidate.py:101-102and:778-786(LANGUAGE_TAG,MAX_LANGUAGE_LENGTH,_language).?language=portuguese-brazil, or a form sent with any other value, is accepted. Tried on the test settings: postinglanguage=Not A Language At Allanswered 302 and stored fourTranslationrows undernot a language at all(21 characters in a 10-character column). The entry then lists a "language" of that name, and no CV can match it. SQLite does not enforce the column length; on PostgreSQL the insert fails withDataError, and the person gets a server error.chosen_language(): accept a value that matchescandidate.LANGUAGE_TAGand fitsMAX_LANGUAGE_LENGTH(moved intotranslatingso both paths share one check). Rows the candidate importer wrote under tags outsidelanguages.LANGUAGESstay editable. Answer anything else with a 404 or with the page and no form, and never save it.Done when
tests/test_career_languages.pyposts a language that is not a tag, and one longer than ten characters, and finds noTranslationrows and no 500; the same forGET ?language=.