Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File name is too long #93

Closed
derevnjuk opened this issue May 19, 2022 · 0 comments · Fixed by #94
Closed

File name is too long #93

derevnjuk opened this issue May 19, 2022 · 0 comments · Fixed by #94
Assignees
Labels
Type: bug Something isn't working

Comments

@derevnjuk
Copy link
Member

Steps to reproduce:

  1. Create a scan
beforeEach(() => {
  scan = runner
    .createScan({
      tests: [TestType.LFI],
      smart: false,
      skipStaticParams: false,
      slowEpTimeout: 600000,
    })
    .threshold(Severity[severity]);
});

2. Start this scan on URL with host-part that exceeds 260 symbols limit

```ts
describe('LFI', () => {
  it(`BC - ${severity}`, async () => {
    let url = `https://${ "a".repeat(63) }.${"a".repeat(63)}.${"a".repeat(63)}.${"a".repeat(63)}.com`
    await scan.run({
      method: 'GET',
      url: url
    });
  });
}); 

Expected: Hostname will be substituted into the default name. The default name will be truncated to 260 symbols.

Actual:

 ✘ ❯ npx jest tests/check_ln.test.ts
  console.log
    [2022-05-19T06:53:53.429Z] [WARN   ] - (!) IMPORTANT: A new Repeater version (8.9.0) is available, please update @sec-tester.

      at Logger.write (packages/core/src/logger/Logger.ts:55:13)

 FAIL  tests/check_ln.test.ts (8.065 s)
  LFI
    ✕ BC - HIGH (1088 ms)

  ● LFI › BC - HIGH

    HttpCommandError: File name is too long.

      at HttpCommandDispatcher.performHttpRequest (packages/bus/src/dispatchers/HttpCommandDispatcher.ts:66:13)
      at ExponentialBackoffRetryStrategy.acquire (packages/bus/src/retry-strategies/ExponentialBackoffRetryStrategy.ts:32:17)
      at HttpCommandDispatcher.execute (packages/bus/src/dispatchers/HttpCommandDispatcher.ts:28:22)
      at DefaultScans.sendCommand (packages/scan/src/DefaultScans.ts:55:20)
      at ScanFactory.createAndUploadHar (packages/scan/src/ScanFactory.ts:68:20)
      at ScanFactory.buildScanConfig (packages/scan/src/ScanFactory.ts:45:20)
      at ScanFactory.createScan (packages/scan/src/ScanFactory.ts:27:20)
      at SecScan.run (packages/runner/src/lib/SecScan.ts:20:18)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   0 total
Time:        8.115 s, estimated 9 s
Ran all test suites matching /tests\/check_ln.test.ts/i.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant