jump.tf Forums
Welcome B)

JumpAssist Unofficial Updates

nolem · 65 · 32620

Indust

  • Newbie
  • *
    • Posts: 2
    • Frags: +0/-0
    • View Profile
Code: [Select]
L 07/22/2016 - 15:35:03: [jumpassist.smx] OnSteamIDUpdate() - Query failed! You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's pretty good')' at line 1
speedrun.sp L1271
Code: [Select]
Format(query, sizeof(query), "UPDATE steamids SET name='%s' WHERE SteamID='%s'", name, steamid);
lol, just found a sql injection.


AI

  • Administrator
  • Proficient
  • *****
    • Posts: 417
    • Frags: +0/-0
  • Plugins Developer
    • View Profile
    • Jump Academy
See also: SQL_PrepareQuery and SQL_BindParamString.

Patch required at jumpassist/speedrun.sp lines 1271 and 1281:

For example:
Code: [Select]
Format(query, sizeof(query), "UPDATE steamids SET name=? WHERE SteamID='%s'", steamid);

decl String:sError[256];
new Handle:hPrepared = SQL_PrepareQuery(g_hDatabase, query, sError, sizeof(sError));
if (hPrepared == INVALID_HANDLE) {
    LogError("OnSteamIDCheck() - Could not prepare query: %s", sError);
    return;
}

SQL_BindParamString(hPrepared, 0, name, false);

if (!SQL_Execute(hPrepared)) {
    LogError("OnSteamIDCheck() - Query failed!");
}
CloseHandle(hPrepared);

Unfortunately, there is no threaded version of SQL_Execute.
« Last Edit: July 22, 2016, 08:22:26 AM by AI »



JoinedSenses

  • ECJ Owner
  • Administrator
  • Novice
  • *****
    • Posts: 56
    • Frags: +0/-0
    • View Profile
I've pushed an update on ECJ for regen of new weapons. Though JA isn't exactly maintained anymore, here are the item index bits I've updated for anyone who may stumble upon this. (~Line 3013 of jumpassist.sp - May vary)

Code: [Select]
// Rocket Launchers
case 18, 205, 127, 513, 658, 800, 809, 889, 898, 907, 916, 965, 974, 15006, 15014, 15028, 15043, 15052, 15057, 15081, 15104, 15105, 15129, 15130, 15150:
{
SetEntProp(iWeapon, Prop_Data, "m_iClip1", 4);
SetAmmo(client, iWeapon, 20);
}
Code: [Select]
// Stickybomb Launchers
case 20, 207, 661, 806, 895, 904, 913, 962, 971, 15009, 15012, 15024, 15038, 15045, 15048, 15082, 15083, 15084, 15113, 15137, 15138, 15155:
{
SetEntProp(iWeapon, Prop_Data, "m_iClip1", 8);
SetAmmo(client, iWeapon, 24);
}
Code: [Select]
// Heavy, soldier, pyro, and engineer shotgun
case 9,10,11,12,199,997,1141,1153,15003,15016,15044,15047,15085,15109,15132,15133,15152:
{
SetEntProp(iWeapon, Prop_Data, "m_iClip1", 6);
SetAmmo(client, iWeapon, 32);
}


JoinedSenses

  • ECJ Owner
  • Administrator
  • Novice
  • *****
    • Posts: 56
    • Frags: +0/-0
    • View Profile
Dunno if anyone is even using this plugin anymore. Ive done a lot of updates to the master version of the plugin here: https://github.com/JoinedSenses/JumpAssist

It might be merged with nolem's master branch soonish.

Updated syntax, fixed a few bugs, cleaned up the code. I had a lot of issues with the previous one, especially when reloading it, the server would crash.

I also have my own version for ECJ that's a hybrid between this and the jump-basics minimal jump plugin by nolem here: https://github.com/JoinedSenses/TF2-ECJ-JumpAssist
I'll be cleaning this one up and updating syntax over the next week. The main difference is that i ripped out the speedrun bits and kept in the racing/core functionality.

I've also created an engi quick build plugin which modifies weapon attributes and enables sentries to spawn in nearly instantly: https://github.com/JoinedSenses/TF2-Sentry-QuickBuild