• (nodebb)

    It's not much different from inter-personal communication. For example, you can severely alter your relationship with a lady if you ask her, WHY ARE YOU SO DAMN FAT?? Just like with this PHP application, a simple query has very far reaching consequences :)

  • guest (unregistered)

    come on....

    Kruft is a municipality in the district of Mayen-Koblenz in Rhineland-Palatinate, western Germany.

    Cruft is a jargon word for anything that is left over, redundant and getting in the way.

  • Tom (unregistered)

    Welcome to France, where every public administration website or app is a piece of cr*p that only works 50% of the time, and for which the government spent millions of euros of taxpayer money...

  • Yikes (unregistered)

    I was going to add a snarky comment mocking how difficult arithmetic is, but it would only subtract from the conversation, and I didn't want to divide us in these times.

  • Wharrgarbl (unregistered) in reply to guest

    That's how people from Springfield spell it.

  • Scragar (unregistered)

    many stored a condensed array representing the row that was altered, like:


    Ah yes, PHPs serialize method that converts anything into a mess of unreadable text that is supposed to be able to preserve the exact state but doesn't quite work that way in practice since resources ( like database connections, filehandles, curl sockets, or similar ) are noted as being a resource without any details about construction. So if you unserialize it the result is a broken resource which doesn't work and can only ever really cause bugs since to all calling code it is a valid resource so it looks like it should work to most analysis.

  • shcode (unregistered)

    "and then a "request" which just seemed to log the raw SQL run to alter the table. That last one didn't seem important"

    EXCUSE ME? That raw sql is not just the most important part of the audit log, it's literally THE ONLY IMPORTANT (and the only necessary) part of the audit log! This is trwtf.

  • Nick (unregistered) in reply to shcode

    Ah-ha! I think we just found the original designer of this application!

    And let me guess… not only is it the most important part of the Audit log, it’s also “Free” - you set it up so that when you write to the Audit Log, the system automatically captures the previous SQL, and saves it along with your Audit update, right?

    That’s why it is critical that developers always put their Audit statements immediately after the data update statement… and of course, everything is single threaded…

  • (nodebb)

    updating a workshop's status from "active" to "cancelled" was purportedly done by this query: SELECT

    Where's the problem with that? You just need an ONSELECTtrigger which then executes some UPDATE statement.

  • Officer Johnny Holzkopf (unregistered) in reply to Tom

    It's interesting that France, being a country that is proud of its language and tries to keep it "clean", allows user-provided identifiers in code to be French mangled with English like "stages.lieuxid = lieux.lieuxid". Couldn't that have been translated properly? Additionally, it looks like they have been shortening USER to USR, but missed the opportunities of "old-people IBM speak", so they could have used USRUPDTE and USRCREAT or even USRUPD and USRCRT... maybe the tax-paying citizens would have been billed a few Euro less?

  • Foo AKA Fooo (unregistered)
    Comment held for moderation.
  • Christopher (unregistered) in reply to shcode
    Comment held for moderation.
  • Christopher (unregistered) in reply to BernieTheBernie

    I mean, having a SELECT logged as an UPDATE seems bad enough to me... But it's more so the information that's being queried which, reading it now, I realize I failed to make entirely clear... the "lieux" table is a list of locations where the workshops are hosted; it contains the address among other information. The select in question only returned the identifying code (01 - 95) for the region of France that workshop was being held in. To cancel the workshop. Stored in the "stages" table. At least if there had been an ONSELECT trigger somewhere it would have made sense!

  • Shiwa (unregistered) in reply to Officer Johnny Holzkopf

    We french love / despise our contradictions. We struggle / have to learn english / preserve french, thanks to / despite our really great / awful translations for computer science / informatique. It gets really fun/weird when a small french team goes international or when developers use english for computer terms (id) and french for business terms (lieu).

    But no matter the country or culture, lazy programmers will use lazy translations. Native english speakers just benefit from natural camouflage.

  • (nodebb)

    I suspect that - at least at one point - it was up to the user to paste in what they'd done, and some of them didn't copy the latest query before pasting.

Leave a comment on “Minor Revisions”

Log In or post as a guest

Replying to comment #:

« Return to Article