Repository navigation
Commit f2a8d3d
Validate VLAN ID path parameter (#7329)
* Validate VLAN ID path parameter
Creating a VLAN with a non-numeric ID (e.g. /vlan/abc) raised a
ValueError from int() and surfaced as a 500 error. VLAN IDs outside the
valid 802.1Q range were also passed on to NetworkManager unchecked.
Validate the VLAN ID as an integer in 1..4094, so clients get a 400 with
a clear message.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Allow VLAN ID 0 for 802.1p priority tagging
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent 02dfc50 commit f2a8d3d
2 files changed
Lines changed: 48 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
| |||
692 | 695 | | |
693 | 696 | | |
694 | 697 | | |
695 | | - | |
696 | | - | |
697 | | - | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
698 | 705 | | |
699 | 706 | | |
700 | 707 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
415 | 422 | | |
416 | 423 | | |
417 | 424 | | |
418 | 425 | | |
| 426 | + | |
419 | 427 | | |
420 | 428 | | |
421 | 429 | | |
422 | 430 | | |
423 | 431 | | |
424 | | - | |
| 432 | + | |
425 | 433 | | |
426 | 434 | | |
427 | 435 | | |
| |||
431 | 439 | | |
432 | 440 | | |
433 | 441 | | |
434 | | - | |
| 442 | + | |
435 | 443 | | |
436 | 444 | | |
437 | 445 | | |
| |||
441 | 449 | | |
442 | 450 | | |
443 | 451 | | |
444 | | - | |
| 452 | + | |
445 | 453 | | |
446 | 454 | | |
447 | 455 | | |
| |||
457 | 465 | | |
458 | 466 | | |
459 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
460 | 495 | | |
461 | 496 | | |
462 | 497 | | |
| |||
0 commit comments