copacetic

joined 3 years ago
MODERATOR OF
[–] copacetic@discuss.tchncs.de 19 points 1 week ago* (last edited 1 week ago)

If you use the SQLite C API like this

    char query[256];
    snprintf(query, sizeof(query),
             "SELECT * FROM users WHERE username = '%s'", username);
    int rc = sqlite3_exec(db, query, NULL, NULL, &err_msg);

and someone enters Robert'; DROP Table Students;-- as username, it deletes the table Students.

    const char *sql = "SELECT * FROM users WHERE username = ?";
    int rc = sqlite3_prepare_v2(db, sql, -1, &stmt, NULL);
    if (rc != SQLITE_OK) {
        fprintf(stderr, "Failed to prepare statement\n");
        return;
    }
    sqlite3_bind_text(stmt, 1, username, -1, SQLITE_STATIC);

Using this "prepared statement" and "bind", your code is secured against such SQL injection attacks.

[–] copacetic@discuss.tchncs.de 8 points 3 weeks ago

Not with respect to having an account. This one is "May 15th, 2024"

Germany's government was "Dec 23, 2022". I don't know about others.

[–] copacetic@discuss.tchncs.de 14 points 3 weeks ago

Heise:

For the SPD's account, this is already the second withdrawal from X; it had been reactivated before the federal election.

Let's see how long it holds this time.

[–] copacetic@discuss.tchncs.de 17 points 4 weeks ago (3 children)

He tries to establish an EU Independence Day apparently.

[–] copacetic@discuss.tchncs.de 2 points 1 month ago (1 children)

It could actually be a good thing if this nothingburger gets some attention and scares some politicians. It could be yet another case which demonstrates that the US don't want to be a partner of the EU anymore and that the EU must invest in their own solutions.

[–] copacetic@discuss.tchncs.de 1 points 1 month ago

Cynical me says that was the whole point.

[–] copacetic@discuss.tchncs.de -2 points 1 month ago (1 children)

I don't like it but I agree it is the most likely outcome. My forecast includes the fact that Merz acts as stupid as does.

[–] copacetic@discuss.tchncs.de 5 points 1 month ago

My style too.

A comment on HN pointed to BullshitBench. Seems like small steps is an especially good idea.

[–] copacetic@discuss.tchncs.de 79 points 1 month ago (2 children)

The planned measures sound very similar to what China is already doing for years?

[–] copacetic@discuss.tchncs.de 7 points 1 month ago

It is not just Trump. MAGA, Vance, Thiel, Musk, and others will probably still be there when Trump is gone.

[–] copacetic@discuss.tchncs.de 121 points 1 month ago (5 children)
[–] copacetic@discuss.tchncs.de 3 points 1 month ago (7 children)

What do you mean "revoked"? Liebich's german Wikipedia page does not say anything like it. It says Amtsgericht Halle applied to change it back and that Liebich herself applied to change to first name "Anne Frank" and gender "diverse". Both proceedings seem to be open still?

Also, she did not change her sex, just her gender, did she?

 

As part of changing laws in Europe, Meta now offers the option for you to chat with others using third-party messaging apps that have integrated with WhatsApp and that you choose to turn on.

Note: Chats with third-party apps are only available in select regions and may not be available to you.

I feel sorry for all in the wrong region.

 

Statement by President Macron of France, Chancellor Merz of Germany, Prime Minister Meloni of Italy, Prime Minister Tusk of Poland, Prime Minister Sánchez of Spain, Prime Minister Starmer of the United Kingdom and Prime Minister Frederiksen of Denmark on Greenland.

Arctic security remains a key priority for Europe and it is critical for international and transatlantic security.

NATO has made clear that the Arctic region is a priority and European Allies are stepping up. We and many other Allies have increased our presence, activities and investments, to keep the Arctic safe and to deter adversaries. The Kingdom of Denmark – including Greenland – is part of NATO.

Security in the Arctic must therefore be achieved collectively, in conjunction with NATO allies including the United States, by upholding the principles of the UN Charter, including sovereignty, territorial integrity and the inviolability of borders. These are universal principles, and we will not stop defending them.

The United States is an essential partner in this endeavour, as a NATO ally and through the defence agreement between the Kingdom of Denmark and the United States of 1951.

Greenland belongs to its people. It is for Denmark and Greenland, and them only, to decide on matters concerning Denmark and Greenland.

view more: next ›