DeviceFarmer / stf

Control and manage Android devices from your browser.
https://devicefarmer.github.io
Other
3.51k stars 492 forks source link

I can't find a way to change 'STF_ADMIN_EMAIL' #771

Closed QA-Jihyun closed 7 months ago

QA-Jihyun commented 7 months ago

I'm running STF with a terminal in a MAC environment.

sudo stf local public-ip 111.222.333.444 --allow-remote --auth-type ldap --auth-options '["--ldap-url","ldap://localhost","--ldap-bind- dn","cn=admin,dc=test,dc=com","--ldap-bind-credentials","password","--ldap-search-dn","dc=test,dc=com" ,"--ldap-search-field","uid"]'

I'm running STF with terminal(LDAP), but I can't find a way to change 'STF_ADMIN_EMAIL'.

It appears that it can be changed in STF's Linux environment or in Docker.

I want to know how to change it on MAC.

denis99999 commented 7 months ago

@QA-Jihyun , take a look at Running Section of README.md, but currently for that your rethinkdb database has to be recreated (e.g. simply delete it first) otherwise the new value of STF_ADMIN_EMAIL is not taken into account

QA-Jihyun commented 7 months ago

@QA-Jihyun , take a look at Running Section of README.md, but currently for that your rethinkdb database has to be recreated (e.g. simply delete it first) otherwise the new value of STF_ADMIN_EMAIL is not taken into account

I found out that I needed to change the stf admin mail data value in stf's environment file. With your help and searching about rethinkdb, I found out that I needed to change rethinkdb data table to reql, and it worked. Thank you again this time.

denis99999 commented 7 months ago

@QA-Jihyun ,

I found out that I needed to change rethinkdb data table to reql

What is it mean ? I hope you did not try to patch STF tables ? Because it would introduce inconsistencies

QA-Jihyun commented 7 months ago

@QA-Jihyun ,

I found out that I needed to change rethinkdb data table to reql

What is it mean ? I hope you did not try to patch STF tables ? Because it would introduce inconsistencies

After running rethinkdb, you can access the address where rethinkdb was run in the browser.

Afterwards, I used ReQL to search stf's owner.email, and I used ReQL to modify owner.email. (=administrator@fakedomain.com > test@test.com)

If you click 'contact support' in the stf browser after editing owner.email, the onwer.email(test@test.com) address you modified will be designated as the recipient in the mail window.

스크린샷 2024-04-17 오전 9 06 08 스크린샷 2024-04-17 오전 9 07 49 스크린샷 2024-04-17 오전 9 06 54
denis99999 commented 7 months ago

@QA-Jihyun , very bad thing, as I said you have introduced inconsistencies in the database because admin credentials are anywhere in database, currently I am working on a PR enabling the updating of admin credentials in a safe way. As I said, currently if you want to change admin credentials, the only clean way is first to delete the database, and then recreate it by launching stf migrate or stf local