For Pakistan, Attack Exposes Security Flaws