Mercurial > hg > orthanc
comparison OrthancServer/Sources/ServerToolbox.cpp @ 5250:1acd709c8772 db-protobuf
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 08 Apr 2023 10:14:09 +0200 |
parents | eb2684260c19 |
children | acaea72a3e91 |
comparison
equal
deleted
inserted
replaced
5249:f22c8fac764b | 5250:1acd709c8772 |
---|---|
303 return false; | 303 return false; |
304 } | 304 } |
305 | 305 |
306 for (size_t i = 0; i < label.size(); i++) | 306 for (size_t i = 0; i < label.size(); i++) |
307 { | 307 { |
308 if (!(label[i] == '.' || | 308 if (!(label[i] == '_' || |
309 label[i] == '_' || | |
310 label[i] == '-' || | 309 label[i] == '-' || |
311 (label[i] >= 'a' && label[i] <= 'z') || | 310 (label[i] >= 'a' && label[i] <= 'z') || |
312 (label[i] >= 'A' && label[i] <= 'Z') || | 311 (label[i] >= 'A' && label[i] <= 'Z') || |
313 (label[i] >= '0' && label[i] <= '9'))) | 312 (label[i] >= '0' && label[i] <= '9'))) |
314 { | 313 { |
324 { | 323 { |
325 if (!IsValidLabel(label)) | 324 if (!IsValidLabel(label)) |
326 { | 325 { |
327 throw OrthancException(ErrorCode_ParameterOutOfRange, | 326 throw OrthancException(ErrorCode_ParameterOutOfRange, |
328 "A label must be a non-empty, alphanumeric string, " | 327 "A label must be a non-empty, alphanumeric string, " |
329 "possibly with '.', '_', or '-' characters, " | 328 "possibly with '_' or '-' characters, " |
330 "with maximum 64 characters, but got: " + label); | 329 "with maximum 64 characters, but got: " + label); |
331 } | 330 } |
332 } | 331 } |
333 } | 332 } |
334 } | 333 } |