Commit Graph

31 Commits

Author SHA1 Message Date
SkyratBot
84d0c39b6b [MIRROR] Add preference to disable deadmin preferences in CentCom [MDB IGNORE] (#8515)
* Add preference to disable deadmin preferences in CentCom (#61751)

* Add preference to disable deadmin preferences in CentCom

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-10-01 03:03:48 +01:00
SkyratBot
2771ae93ed [MIRROR] Added permission verification to the change_admin_rank proc (#7945)
* Added permission verification to the change_admin_rank proc. (#61137)

Checks if usr has R_PERMISSION before going any further in the change_admin_rank proc.

* Added permission verification to the change_admin_rank proc

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
2021-09-03 03:57:23 +01:00
SkyratBot
13b9467b9f Runtime fixes batch. (#60946) (#7688)
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2021-08-21 22:15:10 +01:00
SkyratBot
7d1d0e1fad [MIRROR] Refactors most spans into span procs (#6315)
* Refactors most spans into span procs

* AA

* a

* AAAAAAAAAAAAAAAAAAAAAA

* Update species.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-16 00:24:49 +01:00
SkyratBot
0fa2b48b59 [MIRROR] 2FA for Admins (#6221)
* 2FA for Admins

* a

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-10 23:59:30 +01:00
SkyratBot
ea9aed5554 [MIRROR] Replace alert usage with tgui_alert (#5815)
* Replace alert usage with tgui_alert

* a

* Update observer.dm

Co-authored-by: Celotajs <81999976+celotajstg@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-05-21 00:06:09 +01:00
SkyratBot
8187d87fb2 [MIRROR] [s]Fix inverted check where if permanent rank changes were disabled in the config, all rank changes would instead always go to the db, even bypassing DBRANK checks. (#2146)
* [s]Fix inverted check where if permanent rank changes were disabled in the config, all rank changes would instead always go to the db, even bypassing DBRANK checks. (#55485)

As this is an admin accessible exploit bypassing the `DBRANKS` flag, merge should slightly rushed but not like "stop the presses" rushed.

* [s]Fix inverted check where if permanent rank changes were disabled in the config, all rank changes would instead always go to the db, even bypassing DBRANK checks.

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2020-12-12 19:11:49 +00:00
SkyratBot
e8bfe6eb68 [MIRROR] [Ready] CDN browser assets! (#312)
* [Ready] CDN browser assets! (#52681)

Rewrites the asset_cache system to handle sending assets to a CDN via a webroot.

see https://github.com/MrStonedOne/tgstation/blob/asset-cdn/code/modules/asset_cache/readme.md

Fixed a lot of bugs with assets, removed some dead code.

Changes:
    Moved asset cache code to transport datums, the currently loaded one is located at SSassets.transport, asset cache calls made before the config is loaded use the simple browse_rsc transport.
    Added subsystem call for when the config loads or reloads.
    Added a webroot CDN asset transport. assets are saved to a file in a format based on the file's hash (currently md5).
    Assets that don't use get_asset_url or get_url_mappings (such as browser assets referred to by static html files like changelog.html or static css files) can be saved to browse_rsc even when in cdn asset mode by setting legacy to TRUE on the datum returned by register_assets
    Added a system for saving assets on a cdn in a hash based namespace (folder), assets within the same namespace will always be able to refer to each other by relative names. (used to allow cdn'ing font awesome without having to make something that regenerates it's css files.).
    The simple/namespaced asset cache datum helper will handle generating a namespace composed of the combined md5 of everything in the same datum, as well as registering them properly.
    Moved external resource from a snowflake loaded file to a config entry, added it to resources.txt
    To ensure the system breaks in local testing in any situation that wouldn't work in cdn mode, the simple transport will mutate the filenames of non-legacy and non-namespaced assets and return this with get_asset_url.
    Simple transport's passive send of all roundstart assets to all clients is now a config that defaults to off. this is to break race conditions during local testings from devs accidentally relying on this instead of using send() properly.

cl
refactor: Interface assets (js/css/images) can now be managed using an external webserver instead of byond's one at a time file transfer queue.
admin: Adds admin verb toggle-cdn that allows admins to disable the external webserver asset transport and revert to the old system. Useful if the webserver backing this goes down (thanks cloudflare).
config: New config file, resources.txt, (must be loaded by an $include statement from the main config)
server: The external_rsc_urls.txt config has been moved to the main config system.
/cl
Porting notes:

Interface webpages must refer to their assets (css/js/image/etc) by a generated url, or the asset must register itself as a legacy asset. The system is designed to break in localtest (on simple/legacy mode) in most situations that would break in cdn mode.

Requires latest tgui.

The webserver must set the proper CORS headers for font files or font awesome (and other fonts) won't load.

/tg/'s webserver config: https://gist.github.com/MrStonedOne/523388b2f161af832292d98a8aad0eae

* [Ready] CDN browser assets!

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2020-08-12 11:32:37 +01:00
nemvar
b87f65d95e Converts ALL typepaths to lowercase (#51642)
* Case of lower

* More changes

* Ruins the nice 420 diff, brainfart when doing the second batch of conversions

* More changes

* Next batch. I think

* Converts even more paths

* Restarts bots

* Capital Free Zone

* Come on travis, do something

* Renames areas

* Bots, please stop dying

* Updates CONTRIBUTING.md and updates a few paths I missed.

* APC recgarftzfvas
/obj/item/computer_hardware/recharger/apc to /obj/item/computer_hardware/recharger/apc_recharger
2020-06-17 20:47:57 -03:00
Bobbahbrown
9b6457f770 Fix Malformed SQL Queries When Editing Admin Permissions (#51625) 2020-06-13 21:52:05 -04:00
Tad Hardesty
829e95896e Replace BSQL with rust-g, paramaterize all queries (#51255)
cl
refactor: BSQL has been replaced with rust-g, improving SQL reliability and safety.
/cl

Queries were parameterized as much as possible. Careful code read by someone else also versed in SQL would be a good idea. Things seemed fine spot-testing roundstart, library, bans, and polls, but more stress-testing may be useful.

Also updates rust-g to v0.4.5:

    Improved Linux .so detection
    Perlin noise functions

Also updates Travis script to bionic.
2020-06-08 16:00:07 +12:00
Rob Bailey
c20a04543b Port of Replays from Yogstation (#48579)
* demos (ported from yogstation)

rustg update + write with no format

use external hook for logging

use proper log vars

fix + clarifying comment

don't start the log

release build of rust-g

fix something caught by the lint

Update code/__DEFINES/subsystems.dm

Co-Authored-By: Jordan Brown <Cyberboss@users.noreply.github.com>

Update code/controllers/subsystem/demo.dm

Co-Authored-By: JJRcop <jrubcop@gmail.com>

Update code/controllers/subsystem/demo.dm

Co-Authored-By: JJRcop <jrubcop@gmail.com>

moves hooks out of a dedicated file

len = 0 to Cut(), remove semicolons

untyped loop

* updated rust_g

* 513 updates
2020-04-06 13:15:48 -04:00
MrPerson
12eecfd181 Makes raw HTML and browser datum popups UTF-8 aware (#49066)
* Makes raw HTML and browser datum popups UTF-8 aware

Admin menus specifically really shouldn't break just because you named some guy "☺s the Clown"

* Fixed new_player.dm

* Fucking filing cabinets
2020-02-01 22:14:31 +01:00
Terra
f2a61476f1 Fixes issue with protected word in MySQL 8.x 2019-06-28 10:31:30 +10:00
ShizCalev
192a5333c3 Automatic deadminning (#42780)
* does the thing

* cleanup

* unbroke deadminning

param broke the verb somehow? honk.

* correct prefs

* more robust handling

* corrected return, cleanup
2019-03-23 10:46:35 +01:00
Jordie0608
b9fb0388f7 rework of legacy admin loading to support punctuation with new format 2018-12-22 18:35:50 +11:00
Jordie0608
3f881722e8 adds query safety for getting ckeys not in player table 2018-08-26 01:45:25 +10:00
Jordie
0d7ef3ed65 Key instead of ckey for user facing logs and ui (#39009)
* converts to using key instead of ckey for user facing logs and ui

* more key_name for airlock wires

* futureproofing check for if key changes

* --onlyckeymatch script argument and fail/success counter

* fix
2018-08-11 02:15:50 +10:00
ShizCalev
ff532a4ca4 Spellchecks TGStation 2018-06-19 18:57:44 -04:00
Jordan Brown
cf7e8aa9ec Qdels queries, adds sleep safety checks, DBcore checks for leaks (#38363)
* Qdels all queries, adds sleep handling

* DB Core messages admins about undeleted queries

* Compile fixes. Adds missing set waitfor

* Remove world/New shennanigans. Add DBQuery/BlockingExecute()

* Less spammy notifications to admins about undeleted queries

* Increase dbcore fire time to 1 minute

* Upgrade undeleted query warning

* Better place of death

* Fix build

* Remove BlockingExecute, see BSQL PR for why

* Yep, missed that one.

* Psyche, that's the WRONG QUERY!!
2018-06-18 22:48:35 +03:00
Nich
3c7bd52e80 allows changing the rank of players in the playerpanel (#38172)
* allows changing the rank of players in the playerpanel

* Update permissionedit.dm

* Update permissionedit.dm
2018-06-01 16:26:21 +03:00
Jordie
c5bc25b97e Fix rank changing with legacy only rank loading (#38160)
Legacy only rank loading would block any permanent rank changing.
Now only blocks adding a new rank to the db.
2018-06-01 09:56:29 +12:00
Kyle Spier-Swenson
4afd51f30f Sync permanent admin removals to the players table immediately 2018-05-24 13:49:16 -07:00
Jordie
e44298a36c some dbadmin fixes (#37623) 2018-05-04 12:14:35 +02:00
Jordie0608
b304c760ae adds log and management tabs to permissions panel 2018-04-17 21:26:24 +10:00
Jordie
4a5c1d07e6 Fixes errors with making temp rank changes before permanent ones (#36897)
* fixes errors with making temp rank changes before permanent ones

* adds parenthesis
2018-04-04 00:53:01 -04:00
Jordan Brown
feb929041b Merge pull request #36554 from Jordie0608/tbhthisisntreallyalegacysystemanymore
Adds config to allow ranks only from txt
2018-03-28 14:01:50 -04:00
Jordie0608
d3db8970e7 adds config to allow ranks only from txt 2018-03-20 15:04:42 +11:00
Jordie0608
7b506402dc adds sync to tgdb button and resizes exclude flag window 2018-03-14 19:23:22 +11:00
Jordie
a95d268fc5 Permission panel fixes (#36219)
* permission panel fixes

* Update permissionedit.dm
2018-03-08 13:00:25 +01:00
Jordie
23a45889ed Modernizes SQL admin loading (#35264)
* updates sqladmins with excluded flags and tempminning

* rank, editing and permission protections; json backup

* fixes

* reverted the wrong file

* fix slidecolor cascading and disabled switches not being sent in form

* removes debug uncommenting

* whoops this too

* commas fix + versions for changelog entry headers since 3.0

* actually account for can_edit_flags and use of @ with - or *

* fixes and rearrangement of admin > localhost > autoadmin precedence

* in case you want to not have autologin autoadmins
2018-03-02 13:38:26 +13:00