Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug while loading config.tdsl #23

Closed
Ucheha opened this issue Mar 10, 2020 · 2 comments
Closed

bug while loading config.tdsl #23

Ucheha opened this issue Mar 10, 2020 · 2 comments
Assignees

Comments

@Ucheha
Copy link

Ucheha commented Mar 10, 2020

in the config.tdsl, authRepository bean definition while using :

cls = 'tigase.db.jdbc.TigaseCustomAuth'

..
defining customer login query:

'user-login-query' = '{call tig_user_login(?,?,'domainname','suspend','true')}'

when the file is loaded, i can see all the properties are loaded successfully apart from the user-login-query, it is loaded like this !!: file: tigase-console.log

'user-login-query' = ')}'

and keep getting below exception

tigase.db.TigaseDBException: Problem accessing repository.
        at tigase.db.jdbc.TigaseCustomAuth.userLoginAuth(TigaseCustomAuth.java:995)
        at tigase.db.jdbc.TigaseCustomAuth.access$000(TigaseCustomAuth.java:79)
        at tigase.db.jdbc.TigaseCustomAuth$1.verifyPlainPassword(TigaseCustomAuth.java:379)
        at tigase.auth.impl.PlainCallbackHandler.handleVerifyPasswordCallback(PlainCallbackHandler.java:159)
        at tigase.auth.impl.PlainCallbackHandler.handleCallback(PlainCallbackHandler.java:117)
        at tigase.auth.impl.PlainCallbackHandler.handle(PlainCallbackHandler.java:65)
        at tigase.auth.mechanisms.AbstractSasl.handleCallbacks(AbstractSasl.java:72)
        at tigase.auth.mechanisms.SaslPLAIN.evaluateResponse(SaslPLAIN.java:80)
        at tigase.xmpp.impl.SaslAuth.process(SaslAuth.java:198)
        at tigase.server.xmppsession.SessionManager$ProcessorWorkerThread.process(SessionManager.java:2587)
        at tigase.util.processing.WorkerThread.run(WorkerThread.java:68)
Caused by: java.sql.SQLException: Could not set parameter at position 1 

i tried to remove the line and adding it again, remove spaces add spaces, nnothing works.

@Ucheha
Copy link
Author

Ucheha commented Mar 10, 2020

additional info:

i made another stored procedure to test :
delimiter //

create procedure tig_user_loginp
(in p_user_name varchar(200),
in p_password varchar(100)
)

when i used it, it loaded successfully.

i think there is bug when loading long procedure ?

@hantu85
Copy link
Contributor

hantu85 commented Mar 10, 2020

There is no issue with loading and using procedures, but TDSL keeps strings within ' chars and you've used unescaped ' chars within your SQL query, which confused TDSL parser and caused this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants