Skip to content

Commit 844641e

Browse files
add validation to stumpless_set_entry_prival
The stumpless_set_entry_prival function did not validate the provided value, meaning that invalid privals could be set with it. This change adds validation to the function, and a new error code that is raised when the prival is invalid.
1 parent 40b238e commit 844641e

File tree

33 files changed

+242
-7
lines changed

33 files changed

+242
-7
lines changed

include/private/config/locale/ar-eg.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@
142142
"النص ليس بصيغة " \
143143
"name=\"value\""
144144

145+
#define L10N_INVALID_PRIVAL_ERROR_CODE_TYPE \
146+
"قيمة الخطورة والمنشأة غير صالحة"
147+
148+
#define L10N_INVALID_PRIVAL_ERROR_MESSAGE \
149+
"قيمة الخطورة والمنشأة يجب ان تكون بصيغة RFC 5424: القيم بين 0 و 255 شاملة"
150+
145151
#define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
146152
"مستوي الشدة غير معلوم "
147153

include/private/config/locale/bg-bg.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@
128128
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
129129
"the string is not of the name=\"value\" format"
130130

131+
# define L10N_INVALID_PRIVAL_ERROR_CODE_TYPE \
132+
"невалидният привал"
133+
134+
# define L10N_INVALID_PRIVAL_ERROR_MESSAGE \
135+
"приватните кодове трябва да бъдат дефинирани в съответствие с RFC 5424:" \
136+
" стойности между 0 и 255 включително"
137+
131138
# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
132139
"невалидната тежест"
133140

include/private/config/locale/bn-in.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@
125125
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
126126
"the string is not of the name=\"value\" format"
127127

128+
# define L10N_INVALID_PRIVAL_ERROR_CODE_TYPE \
129+
"অবৈধ prival"
130+
131+
# define L10N_INVALID_PRIVAL_ERROR_MESSAGE \
132+
"prival কোডগুলি অবশ্যই RFC 5424 অনুসারে সংজ্ঞায়িত করতে হবে: মান 0 থেকে" \
133+
" 255 এর মধ্যে"
134+
128135
# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
129136
"অসফল severity"
130137

include/private/config/locale/cz-cz.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@
124124
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
125125
"the string is not of the name=\"value\" format"
126126

127+
# define L10N_INVALID_PRIVAL_ERROR_CODE_TYPE \
128+
"neplatná prioritní hodnota"
129+
130+
# define L10N_INVALID_PRIVAL_ERROR_MESSAGE \
131+
"kód prival musí být definován v souladu s RFC 5424: hodnoty mezi 0" \
132+
" a 255 včetně"
133+
127134
# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
128135
"neplatná služba"
129136

include/private/config/locale/da-dk.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@
120120
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
121121
"the string is not of the name=\"value\" format"
122122

123+
# define L10N_INVALID_PRIVAL_ERROR_CODE_TYPE \
124+
"den ugyldige prival"
125+
126+
# define L10N_INVALID_PRIVAL_ERROR_MESSAGE \
127+
"prival koder skal være defineret i overensstemmelse med RFC 5424:" \
128+
" værdier mellem 0 og 255 inklusivt"
129+
123130
# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
124131
"den ugyldige alvorlighed"
125132

include/private/config/locale/de-de.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@
119119
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
120120
"Der String entspricht nicht dem name=\"value\" Format"
121121

122+
# define L10N_INVALID_PRIVAL_ERROR_CODE_TYPE \
123+
"der ungültige prival"
124+
125+
# define L10N_INVALID_PRIVAL_ERROR_MESSAGE \
126+
"prival-Codes müssen gemäß RFC 5424 definiert werden: Werte zwischen 0" \
127+
" und einschließlich 255"
128+
122129
# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
123130
"Ungültiger Schweregrad"
124131

include/private/config/locale/el-gr.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@
126126
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
127127
"the string is not of the name=\"value\" format"
128128

129+
# define L10N_INVALID_PRIVAL_ERROR_CODE_TYPE \
130+
"μη έγκυρο prival"
131+
132+
# define L10N_INVALID_PRIVAL_ERROR_MESSAGE \
133+
"οι κωδικοί prival πρέπει να ορίζονται σύμφωνα με το RFC 5424: τιμές μεταξύ 0" \
134+
" και 255 συμπεριλαμβανομένων"
135+
129136
# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
130137
"μη έγκυρη σοβαρότητα"
131138

include/private/config/locale/en-us.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@
121121
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
122122
"the string is not of the name=\"value\" format"
123123

124+
# define L10N_INVALID_PRIVAL_ERROR_CODE_TYPE \
125+
"the invalid prival"
126+
127+
# define L10N_INVALID_PRIVAL_ERROR_MESSAGE \
128+
"prival codes must be defined in accordance with RFC 5424: values between 0" \
129+
" and 255 inclusive"
130+
124131
# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
125132
"the invalid severity"
126133

include/private/config/locale/es-es.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,21 @@
120120
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
121121
"the string is not of the name=\"value\" format"
122122

123+
# define L10N_INVALID_PRIVAL_ERROR_CODE_TYPE \
124+
"el prival inválido"
125+
126+
# define L10N_INVALID_PRIVAL_ERROR_MESSAGE \
127+
"los códigos prival deben ser definidos de acuerdo al RFC 5424:" \
128+
" valores entre 0 y 255 inclusive"
129+
123130
# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
124131
"la gravedad inválida"
125132

126133
# define L10N_INVALID_SEVERITY_ERROR_MESSAGE \
127134
"los códigos de gravedad deben ser definidos de acuerdo al RFC 5424:" \
128135
" valores entre 0 y 7 inclusive"
129136

137+
130138
# define L10N_INVALID_STATE_DURING_UTF8_PARSING \
131139
"se alcanzó un estado inválido durante el análisis de la cadena UTF-8"
132140

include/private/config/locale/fr-fr.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@
116116
# define L10N_INVALID_PARAM_ERROR_MESSAGE \
117117
"la chaîne de caractères n'est pas au format nom=\"valeur\""
118118

119+
# define L10N_INVALID_PRIVAL_ERROR_CODE_TYPE \
120+
"le prival invalide"
121+
122+
# define L10N_INVALID_PRIVAL_ERROR_MESSAGE \
123+
"les codes prival doivent être définis conformément au RFC 5424 : valeurs" \
124+
" comprises entre 0 et 255 inclus"
125+
119126
# define L10N_INVALID_SEVERITY_ERROR_CODE_TYPE \
120127
"la sévérité invalide"
121128

0 commit comments

Comments
 (0)