Are there any security issues leaving the PDB debug files on the live servers?

前端 未结 7 1616
抹茶落季
抹茶落季 2020-12-13 20:12

Are there any security issues keeping the .NET PDB files on the real server?

I know that throwing exceptions might take a bit longer , but who throws exceptions duri

7条回答
  •  离开以前
    2020-12-13 20:27

    If you present failing exceptions to the end-user (aka in Yellow Screen of Death), then it might pose a risk of attacker a getting better insight into your system.

    One of the possible solutions - to have an exception handling policy that:

    1. Logs all exceptions with the original stack trace, additional information and a unique exception ID (Guid).
    2. Replaces fired exception with a wrapper that contains only exception ID (for reference and feedback) and sanitized message (i.e.: no connection strings) with discarded stack trace info.

    Examples of Open Source Exception handling blocks in .NET:

    • From Lokad
    • From Microsoft

    • Theory

提交回复
热议问题