Commit graph

18 commits

Author SHA1 Message Date
Sei Lisa
c8e7d8b92e Add warning to $check_ip in PHP about the cloud server migration 2020-09-11 13:09:31 +02:00
Sei Lisa
65ce40036a Fix warning when the initial connection to the database fails
When `mysqli_connect` fails, `$link` becomes false, and the `or` branch is taken, which uses `mysqli_error($link)`, which in turn fails because `$link` is false.

Since it's correctly checking `mysqli_connect_errno()` in the next line, just removing the `or` suffices.

Per report by jonhboy Resident.
2018-05-17 00:45:15 +02:00
Sei Lisa
6cee2ac634 Initialize variable before appending to it. 2017-09-29 12:51:40 +02:00
Sei Lisa
d4359b133e Report error in settings.php when max length of 64K is exceeded.
Fixes #49.
2017-09-29 12:49:31 +02:00
Sei Lisa
27ae15b5ec Change utf8 to utf8mb4, checking if we succeed. 2017-09-16 00:02:10 +02:00
Sei Lisa
ca2714c50a Fix uninitialized variable in email_death() 2017-09-15 18:22:18 +02:00
Sei Lisa
57028e44d1 Remove parse_llHTTPRequest_headers function.
It served no practical purpose and used undefined variables to define values that weren't used anyway.

Also, comment out the variables that aren't used after parsing the X-SecondLife headers.
2017-09-15 18:22:18 +02:00
Sei Lisa
a8ec1d4747 Change the string escaping strategy
All variable values in SQL statements should use IntSQL or StrSQL as appropriate, rather than variables directly, with the exception of the table name.

This is akin to using htmlspecialchars to include text in HTML, or urlencode to include text in a URL. Normally you have the text in raw form and convert it as appropriate depending on where you're inserting it.
2017-09-15 18:22:18 +02:00
Sei Lisa
ae6745f26a Fix table issues
- Get rid of Y2K38 problems https://xkcd.com/607/
  - This also removes default value and on-update value for the timestamp, but these were being set explicitly so no harm done.
- Set the text field's character set to UTF-8.
- Set the link's character set to UTF-8.
2017-09-15 18:22:18 +02:00
Sei Lisa
a1b4e36cf4 Simplify regular expression for UUID 2017-09-15 18:22:18 +02:00
Sei Lisa
debd083735 Report bad request if no valid action was specified. 2017-09-15 18:22:18 +02:00
Sei Lisa
3b8453806e Move configuration to a separate file.
This will allow replacing the main file without needing to re-add the settings.

For example, settings.php can be always kept up-to-date locally via a symbolic link, without altering the configuration.
2017-09-15 18:22:18 +02:00
Sei Lisa
2d10bf9cc5 Omit the ending tag.
As recommended in http://php.net/manual/en/language.basic-syntax.phptags.php
2017-09-15 18:22:18 +02:00
Sei Lisa
4b009323f3 Fix typo in table creation statement. 2017-09-15 17:51:28 +02:00
codeviolet
c2e2d63f70 Amend copyright notice 2017-09-02 10:03:01 +02:00
Sei Lisa
f97f8c5a5b Whitespace-only changes.
- Remove CR before LF to allow Git to use system-specific line terminators.
- Expand tabs to spaces.
- Remove spaces at end of line.
2017-08-31 12:08:57 +02:00
Sei-Lisa
77fe80bb66 Hot fix for settings.php (#27)
* Hot fix for settings.php

It's failing whenever there's more than 1 chunk.

Fixes #25.

* Escape $ip_packed.

It can contain arbitrary binary characters, so it needs escaping.
2017-08-29 11:21:09 +10:00
codeviolet
705ac02889 adding settings.php and Noob-detector.lsl per #20 2017-08-28 12:02:53 +02:00