L2JMobius

Seven Signs Massive Critical Erro exploit

Norvox · 3 · 545

Offline Norvox

  • Heir
  • **
    • Posts: 15
Some weeks ago we had a issue that some guy with client knowledge cause a massive critical error.

Problem : Critical Error when change title.

Scenario : A guy with 2 characters in a clan make a exploit attack. The first character use hide ( dagger skill )  and move to a location that want to make massive critical error. With the second char they change this character title to {i36}. With this all player recive character update package that cause critical error.

We solve this disable title icons first and replace the code that validate ( regexp ) to invalidade if its more than i35.

You can reproduce this problem just change you title with admin comand , change title item or clan interface.

https://prnt.sc/Vo53I_Sn2fF_



Online Mobius

  • Distinguished King
  • *****
    • Posts: 17001
Try this.
Code: [Select]
Index: java/org/l2jmobius/gameserver/model/actor/Creature.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/Creature.java (revision 14613)
+++ java/org/l2jmobius/gameserver/model/actor/Creature.java (working copy)
@@ -2575,7 +2575,24 @@
  }
  else
  {
- _title = isPlayer() && (value.length() > 21) ? value.substring(0, 20) : value;
+ if (isPlayer())
+ {
+ // Remove all {i<number>} where the number is not in the range 0-34.
+ final String title = value.replaceAll("\\{i-(\\d+)|\\{i(3[5-9]|[4-9]\\d*)\\}", "");
+
+ if (title.length() > 21)
+ {
+ _title = title.substring(0, 20);
+ }
+ else
+ {
+ _title = title;
+ }
+ }
+ else
+ {
+ _title = value;
+ }
  }
  }