It is a common misperception that the requirements for castling are even more stringent than the above.To clarify:
The chosen rook may be under attack.
The rook may move through an attacked square, provided the king does not. The only such square is the one adjacent to the rook, when castling queenside.
The king may have been in check earlier in the game (provided the king did not move when resolving the check).
This is for a note in Chess.com Beta by @Reyc14 claiming there is a bug when playing against Computer3-HARD.
The claim was that while attacking b1, the computer still castled long, even though he attacked a square between the rook and king.
Game: https://www.chess.com/live/game/2487542033
Castling rules:
https://en.wikipedia.org/wiki/Castling
Misconceptions of castling rules:
It is a common misperception that the requirements for castling are even more stringent than the above.To clarify:
Source: https://en.wikipedia.org/wiki/Castling