Commit b3e63a0
committed
tls: require the domain type in db_update and db_delete
A tls_mgm row is identified by (domain, type), so defaulting the type
when it is not given lets these two commands change a different domain
than the intended one. Require it for the commands that modify an
existing row; db_add and db_show keep falling back to tls_db_type.
Also guard against read_param() returning None when there is no
terminal to prompt on, which made the type default path raise an
AttributeError instead of reporting the missing value.1 parent a45a669 commit b3e63a0
2 files changed
Lines changed: 19 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
| 411 | + | |
412 | 412 | | |
413 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
414 | 416 | | |
415 | 417 | | |
416 | 418 | | |
| |||
423 | 425 | | |
424 | 426 | | |
425 | 427 | | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
426 | 432 | | |
427 | 433 | | |
428 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
429 | 438 | | |
430 | 439 | | |
431 | 440 | | |
| |||
442 | 451 | | |
443 | 452 | | |
444 | 453 | | |
445 | | - | |
| 454 | + | |
446 | 455 | | |
447 | 456 | | |
448 | 457 | | |
449 | 458 | | |
450 | 459 | | |
451 | | - | |
| 460 | + | |
| 461 | + | |
452 | 462 | | |
453 | 463 | | |
454 | 464 | | |
| |||
511 | 521 | | |
512 | 522 | | |
513 | 523 | | |
514 | | - | |
| 524 | + | |
515 | 525 | | |
516 | 526 | | |
517 | 527 | | |
| |||
619 | 629 | | |
620 | 630 | | |
621 | 631 | | |
622 | | - | |
| 632 | + | |
623 | 633 | | |
624 | 634 | | |
625 | 635 | | |
| |||
0 commit comments