Where i can edit the traccar-web.war to allow traccar manager app work.
Hi, Which file (traccar-web.war ) and code i can edit to allow traccar manager app ( android & ios ) work. Thank you very much.
Android – https://github.com/tananaev/traccar-manager-android iOS – https://github.com/tananaev/traccar-manager-ios
The main incompatibility is the password hashing functionality:
-
Currently Traccar Web UI Mod does not support hashing function from the backend: https://github.com/tananaev/traccar/blob/master/src/org/traccar/helper/Hashing.java#L52
-
Salt for the backend is generated per user, in my project there is a single salt for the whole application. I believe this is fine for an acceptable level of security.
So, to handle this the following steps must be changed:
-
Add new hashing function https://github.com/vitalidze/traccar-web/blob/dev/src/main/java/org/traccar/web/shared/model/PasswordHashMethod.java with exactly same algorithm as implemented on the backend with
saltfrom thedoHashmethod argument -
Update
database.loginUserquery:
<entry key='database.loginUser'>
SELECT * FROM users
WHERE email = :email;
</entry>
It should join the salt column from application_settings table with salt alias. This will force backend to use salt from the global settings.
- All users should have
emailfield filled in because backend is using it for the authorization.
For testing here are docs of the backend API: https://www.traccar.org/traccar-api/
These are just my thoughts, I haven't tried it myself.
Hi Vitaly,
Have you fixed this issue in your new release? or How can I use your rest API in our mobile app.
Hi @onethings
Have you got any solution of this issue. I am also facing same issue.
No, I haven't fixed that yet.
среда, 13 июля 2016 г. пользователь rbniranjan написал:
Hi Vitaly,
Have you fixed this issue in your new release? or How can I use your rest API in our mobile app.
Hi @onethings https://github.com/onethings
Have you got any solution of this issue. I am also facing same issue.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vitalidze/traccar-web/issues/759#issuecomment-232391219, or mute the thread https://github.com/notifications/unsubscribe/ACMCNWupaaU2JG7iPMI_Snk98lHkK1XEks5qVQOjgaJpZM4JEP3a .
Kind regards, Vitaly Litvak
Thanks for your update.
Now I am thinking into another way. I will try to login using your api and then try to use traccar server api. I hope it will work.
Hi, @rbniranjan I haven't got solution of this issue yet.
@rbniranjan i found this android app can login with traccar web ui mod and traccar mod. https://play.google.com/store/apps/details?id=org.erlymon.traccarm Have you got any solution yet?
@vitalidze Can you show the correct way to make the add new hashing function with the same algorithm and the query please? I'm lose! XD
I gave a reference to code in backend project. You need to put it into PasswordHashMethod class somehow.
Hi All
Hope you are well. I am also having this issue. I have VERY limited programming knowledge and am trying to learn. I do however need some guidance as to how to fix this issue? It is quite important to me as I would like to learn to develop on this MOD as it is FANTASTIC!
Please can you guide me on how to get this resolved?
@rdentandt do you have a particular question? From my point of view all needed information is already present in this ticket.
Hi There
Might be but I am no developer and would some guidance on how to add the doHash commands to the java file before compiling.
Apologies for this but like I said I have no development experience. I am learning so any guidance will be helpful.
Thanks
On 13 Nov 2016, at 3:26 PM, Vitaly Litvak [email protected] wrote:
@rdentandt do you have a particular question? From my point of view all needed information is already present in this ticket.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@rdentandt You need to start from learning java.
Hi, I developed a Traccar manager version using hybrid framework (Ionic), it is free and compatible with the UI Mod: https://play.google.com/store/apps/details?id=com.ionicframework.tracgpsmonitor461755
# LOVE YOU LITVAK! There changes on new version are awesome! Thank you very much!
hi,, litvak
i cant add a new user.. in WEB UI 3.9 the log
|Service traccar|17-05-06 19:11:47| ... 52 more FINEST|1034/0|Service traccar|17-05-06 19:11:47|Caused by: org.h2.jdbc.JdbcSQLException: NULL not allowed for column "NAME"; SQL statement: FINEST|1034/0|Service traccar|17-05-06 19:11:47|insert into users (id, admin, archive, blocked, companyName, email, expirationDate, firstName, lastName, login, managedBy_id, manager, maxNumOfDevices, notifications, password, password_hash_method, phoneNumber, readOnly, salt, userSettings_id) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23502-194] FINEST|1034/0|Service traccar|17-05-06 19:11:47| at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
@cuantic first of all, please don't post your questions in random threads. I don't see any relation with this thread.
Regarding your issue: this means you haven't followed installation instructions carefully. Most probably you haven't dropped existing database or haven't disabled database schema updates.