How was the endurance test in the Cessna 172 legal?
Regarding flight time, duty periods, or rest requirements, no current regulations would have specifically imposed limitations on this flight. This flight would have been operated as a private flight under 14 CFR 91 under today's regulations. 

The flight, duty, and rest requirements are specified only for certain commercial operations including airline, charter, and fractional. Flight instruction is also generally limited to 8 hrs in a 24 hr period. Paid pilots routinely fly 12-14+ hours in a day, including in certain patrol activities and in flying private jets. 

Refueling is not generally restricted by FAA aiation regulations in a way that would specifically impact this operation. As with the flight time concern, the catch all "careless and reckless" regulation might apply first.

For some of the same reasons that the crew flight time was not restricted, many of the maintenance requirements such as 100 hr inspections, would not be required of a private flight. However, the 100 hr seat rail inspection AD would be problematic today.