Project

General

Profile

Actions

Bug #5049

closed

Fix ValidatorConfig behavior with empty configuration

Added by Teng Liang about 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Security
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

The current ValidationPolicyConfig throws an exception when loading empty config section. A better behavior would be:

  • allow loading an empty config file/section without throwing
  • fail any validation attempts when the configuration is empty

Related issues 1 (1 open0 closed)

Blocks NFD - Feature #5031: Make NFD work out of the boxNew

Actions
Actions #1

Updated by Davide Pesavento about 5 years ago

  • Tracker changed from Task to Bug
  • Category set to Security
Actions #2

Updated by Davide Pesavento about 5 years ago

  • Subject changed from Improve validator behavior: empty config section can be loaded but fails validation to Fix ValidatorConfig behavior with empty configuration
  • Description updated (diff)
Actions #3

Updated by Davide Pesavento about 5 years ago

Teng Liang wrote:

The current ValidationPolicyConfig throws an exception when loading empty config section, but then allows any validation.

I did not observe the second part of the behavior described above ("allows any validation"). @Teng, can you explain how to reproduce that?

Actions #4

Updated by Davide Pesavento about 5 years ago

  • Status changed from New to Code review
  • Assignee set to Davide Pesavento
  • Target version set to v0.7
Actions #5

Updated by Davide Pesavento about 5 years ago

Actions #6

Updated by Teng Liang about 5 years ago

Davide Pesavento wrote:

Teng Liang wrote:

The current ValidationPolicyConfig throws an exception when loading empty config section, but then allows any validation.

I did not observe the second part of the behavior described above ("allows any validation"). @Teng, can you explain how to reproduce that?

The test case in https://gerrit.named-data.net/c/NFD/+/5776/12/tests/daemon/mgmt/rib-manager-sl-announce.t.cpp#182, the validation should fail but succeed.

Actions #7

Updated by Davide Pesavento about 5 years ago

Teng Liang wrote:

Davide Pesavento wrote:

Teng Liang wrote:

The current ValidationPolicyConfig throws an exception when loading empty config section, but then allows any validation.

I did not observe the second part of the behavior described above ("allows any validation"). @Teng, can you explain how to reproduce that?

The test case in https://gerrit.named-data.net/c/NFD/+/5776/12/tests/daemon/mgmt/rib-manager-sl-announce.t.cpp#182, the validation should fail but succeed.

I still cannot reproduce (after applying the ndn-cxx patch of course, there's no way to test without it). Test cases behave as expected.

Actions #8

Updated by Davide Pesavento about 5 years ago

  • Description updated (diff)
  • Status changed from Code review to Closed
  • % Done changed from 0 to 100
Actions #9

Updated by Davide Pesavento almost 4 years ago

  • Tags set to ValidatorConfig
Actions

Also available in: Atom PDF