United Continental Holdings Inc. sent out an alert about a breach in cockpit-door security procedures after a flight attendant mistakenly posted information that included access codes on a public website, according to a pilot who was briefed on the matter.

Officials at the Air Line Pilots Association union said Sunday that the problem had been fixed.

The...