From Karl Lembke:
In the latest Harry Potter book, we see Hogwarts implementing security precautions in order to safeguard its students and faculty.
One step that was taken was that all the students were searched – wanded, in fact – to detect any harmful magic. In addition, all mail coming in or out was checked for harmful magic.
In spite of these precautions, two students are nearly killed by cursed items.
One of the items was a poisoned bottle of mead, which made it onto school grounds and into a professor’s office.
It turned out that packages sent from various addresses in the nearby town were not checked. The addresses were trusted, and anything received from them was considered safe. When a key person was compromised (in this case, by a mind-control spell), the trusted address was no longer trustworthy, and a gaping hole in security was created.
Of course, since everyone knew everything was checked on its way into the school, no one felt the need to take any special precautions.
The moral of the story is, inadequate security can be worse than no security at all.
And while we’re on the subject, can you really render a powerful wizard helpless simply by taking away his wand? And is taking away a powerful wizard’s wand simply as easy as doing something to him at the same time he is doing something else?
One, this means that you’re dead if you’re outnumbered. All it would take it two synchronized wizards, both of much lower power level, to defeat a powerful wizard. And two, it means that you’re dead if you’re taking by surprise or distracted.
This seems like an enormous hole in magical defenses, one that wizards would have worked feverishly to close up generations ago.
EDITED TO ADD: Here’s a page on trust in the series.