X

False positive "Replier can only add posts at the end of a thread" from non-monotomic time()

  • Thread starter Thread starter Xon
  • Start date Start date

Visitor Greeting

Welcome to NullWarehouse.com... We are currently seeking Mod's and Contributors. If you wish to apply for a Mod position then please click on Members dropdown arrow, then click on Staff App and fill it out completely and submit it. If you want to be a Contributor then start contributing and we will have our eye on you and take notice, something great could come of it.

  • We have redone the forum. If you notice any issues or errors please open a Support Ticket under the Members dropdown and let us know.
X

Xon

Guest

php's time() function is non-monotomic. This means it can technically go backwards, noticeable on machines which use a timesync service on a very busy forum

Consider the case;
  • UserA starts replying
    • finalSetup - Clock N, Post.post_date = N
  • Clock progress to N+1
  • Another users posts, updating the xf_threadrecord
    • xf_thread.last_post_date = N+1
  • Timsync causes the clock to be set to Clock N
  • UserA's request reloads the last post...

Read more

Continue reading...
 
Back
Top Bottom