Skip to content

Assorted character fixes#460

Merged
NataKilar merged 2 commits intoPersistentSS13:devfrom
NataKilar:assorted-character-fixes
Jul 1, 2023
Merged

Assorted character fixes#460
NataKilar merged 2 commits intoPersistentSS13:devfrom
NataKilar:assorted-character-fixes

Conversation

@NataKilar
Copy link
Collaborator

Description of changes

Fixes being unable to load in with characters with apostrophes/other special characters in their names. This was caused by some missing sanitization in SQL statements and Topic. Also fixes the "Error: you are not an admin" spam created by some missing arguments in checking permissions.

One change should eventually be set upstream: crew records checking against sanitized names in get_crew_record, since this also breaks with apostrophes etc.

Authorship

Myself. Thanks to Unleashed for finding these bugs.


spawning = TRUE
var/DBQuery/char_query = dbcon_save.NewQuery("SELECT `key` FROM `limbo` WHERE `type` = '[LIMBO_MIND]' AND `metadata` = '[key]' AND `metadata2` = '[selected_char_name]'")
var/DBQuery/char_query = dbcon_save.NewQuery("SELECT `key` FROM `limbo` WHERE `type` = '[LIMBO_MIND]' AND `metadata` = '[sanitize_sql(key)]' AND `metadata2` = '[sanitize_sql(selected_char_name)]'")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a comment, but we really should keep db queries all at the same place. Having all that stuff all over the code is a nightmare for maintenance.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I also greatly dislike this whole metadata and metadata2 business so I'd like to solve that simultaneously if we can.

@PsyCommando PsyCommando added 🪲 bug Something isn't working 🐒 Mobs Any issues related to any sort of mobs. Including human mobs. labels Jun 29, 2023
@PsyCommando PsyCommando added this to the Outreach Map Pre-Release milestone Jun 29, 2023
@NataKilar NataKilar merged commit f7378bc into PersistentSS13:dev Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪲 bug Something isn't working 🐒 Mobs Any issues related to any sort of mobs. Including human mobs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants