Secondary authentication edit

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
cheatax21
Posts: 115
Joined: Thu Aug 14, 2008 10:10 am

Secondary authentication edit

Post by cheatax21 »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:6086
L2JDP Revision Number:9838



I would like to ask, where are the secondary authentication (in char selection screen) settings, and how to edit them so the user can put any number he wants, cause now it rejects most of combinations with reason they follow patterns.
NosBit
L2j Veteran
L2j Veteran
Posts: 314
Joined: Mon Mar 11, 2013 4:19 pm

Re: Secondary authentication edit

Post by NosBit »

There is a client side filter you cant do that.
Image
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Secondary authentication edit

Post by UnAfraid »

Ofc u can.
Check this com.l2jserver.gameserver.security.SecondaryPasswordAuth.validatePassword(String)
Image
cheatax21
Posts: 115
Joined: Thu Aug 14, 2008 10:10 am

Re: Secondary authentication edit

Post by cheatax21 »

thanks unafraid will check it tommorow, atm i go sleep:) gn everyone!
cheatax21
Posts: 115
Joined: Thu Aug 14, 2008 10:10 am

Re: Secondary authentication edit

Post by cheatax21 »

Hmm, i found it, though im not so sure what to edit.
Anyone can help out on this?
My issue is that this secondary authentication has too high restriction regarding the pattern.
I mean it rejects pins like 1414562 / 654265 etc..
If sm1 can understand it better than me, to tell me what to edit to remove such restriction :)
thanks in adv
NosBit
L2j Veteran
L2j Veteran
Posts: 314
Joined: Mon Mar 11, 2013 4:19 pm

Re: Secondary authentication edit

Post by NosBit »

UnAfraid wrote:Ofc u can.
Check this com.l2jserver.gameserver.security.SecondaryPasswordAuth.validatePassword(String)
As i said there is a client side filter he cant do that but it seems that server checks for more combinations than client does.
cheatax21 wrote:Hmm, i found it, though im not so sure what to edit.
Anyone can help out on this?
My issue is that this secondary authentication has too high restriction regarding the pattern.
I mean it rejects pins like 1414562 / 654265 etc..
If sm1 can understand it better than me, to tell me what to edit to remove such restriction :)
thanks in adv
You can use this patch it makes server to check only for passwords forbidden by client.
Image
cheatax21
Posts: 115
Joined: Thu Aug 14, 2008 10:10 am

Re: Secondary authentication edit

Post by cheatax21 »

Thank you Nos, very handy patch, solved my issue. I suggest this patch to be commited, since otherwise, its a pain in the *** to manage to make a PIN pwd.. :D
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7008
Joined: Tue Aug 11, 2009 3:36 am

Re: Secondary authentication edit

Post by Zoey76 »

@Nos I think lenght and characters type should be validated server side, otherwise a bot may send a malformed packet, for example.
Powered by Eclipse 4.34 🌌 | Eclipse Temurin 21 ☕ | MariaDB 11.3.2 🗃️ | L2J Server 2.6.3.0 - High Five 🚀

🔗 Join our Discord! 🎮💬
NosBit
L2j Veteran
L2j Veteran
Posts: 314
Joined: Mon Mar 11, 2013 4:19 pm

Re: Secondary authentication edit

Post by NosBit »

Zoey76 wrote:@Nos I think lenght and characters type should be validated server side, otherwise a bot may send a malformed packet, for example.
oh... I removed function to test if client filter really works and forgot to add checks after.

Patch on my post updated now its ok.
Image
cheatax21
Posts: 115
Joined: Thu Aug 14, 2008 10:10 am

Re: Secondary authentication edit

Post by cheatax21 »

Could you tell me if what i write is correct, so i wont do smth stupid ;p

old patch

Code: Select all

@@ -34,7 +36,6 @@ import com.l2jserver.gameserver.network.serverpackets.Ex2ndPasswordAck; import com.l2jserver.gameserver.network.serverpackets.Ex2ndPasswordCheck; import com.l2jserver.gameserver.network.serverpackets.Ex2ndPasswordVerify;-import com.l2jserver.gameserver.util.Util; import com.l2jserver.util.Base64;
In the new there isnt this part of code, this means i put back that lane again ?

Code: Select all

-       for (int i = 0; i < (password.length() - 1); i++)+       if (forbiddenPasswords.contains(password))        {-           char curCh = password.charAt(i);-           char nxtCh = password.charAt(i + 1);-           -           if ((curCh + 1) == nxtCh)-           {-               return false;-           }-           else if ((curCh - 1) == nxtCh)-           {-               return false;-           }-           else if (curCh == nxtCh)-           {-               return false;-           }+           return false;        }
These are the changes yes?
1) i put back the import com.l2jserver.gameserver.util.Util;
2) if (forbiddenPasswords.contains(password))
return false;
NosBit
L2j Veteran
L2j Veteran
Posts: 314
Joined: Mon Mar 11, 2013 4:19 pm

Re: Secondary authentication edit

Post by NosBit »

You can find the file in Eclipse and right click on it then go Team->Revert this will reset the file to its original state then reapply the patch and you will be done.
Image
cheatax21
Posts: 115
Joined: Thu Aug 14, 2008 10:10 am

Re: Secondary authentication edit

Post by cheatax21 »

uh, thank you for this, didnt know it!!
User avatar
lucan
Posts: 590
Joined: Wed Mar 16, 2011 10:39 pm
Location: Brazil

Re: Secondary authentication edit

Post by lucan »

Interesting system but i cant register my code, i get critical errors all times, client system problem?
cheatax21
Posts: 115
Joined: Thu Aug 14, 2008 10:10 am

Re: Secondary authentication edit

Post by cheatax21 »

First post here your revs, and what errors you get,

also, maybe it needs h5 part 5 client , im not sure about that friend.
NosBit
L2j Veteran
L2j Veteran
Posts: 314
Joined: Mon Mar 11, 2013 4:19 pm

Re: Secondary authentication edit

Post by NosBit »

lucan wrote:Interesting system but i cant register my code, i get critical errors all times, client system problem?
it should work in high five part 1 and 2 client in part 3+ i think its broken.
Image
Post Reply