RESTful架构风格下的4大常见安全问题

  • Don’t forget to check correlations between resources in request URL
  • Some rare used HTTP headers might be helpful
  • Restrict API request frequency

这篇略水,某些常见的问题反而都没有提到,例如大木老师遇到的这个问题


Safe Bitfields in C++

Main observation: Use union to implement/simulate bitfields.

Each bitfield is implemented by using a single union member with mask and bit-length being set up initially.

非常 stunning 的一个实现,但是很可惜,根据 comments 这个实现仍然是 undefined behavior,because it call member functions on inactive union members.