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

fix: #1599 - Server passwords are printed during startup #1607

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@Zarthus
Contributor

Zarthus commented Oct 13, 2018

Tested on a clean config:

Fixes #1599

solution 2 (only list no of servers)

[ .. ] Added 1 server(s)...
[ .. ] Loading user module [chansaver]...
[ .. ] Loading user module [controlpanel]...
[ .. ] Forking into the background...
[ >> ] [pid: 10641]
[ ** ] ZNC 1.8.x-git-1788-1eac5ce9 - https://znc.in

password

[ ?? ] Launch ZNC now? (yes/no) [yes]: yes
[ .. ] Opening config [/tmp/znc/configs/znc.conf]...
[ .. ] Loading global module [webadmin]...
[ .. ] Binding to port [+6969]...
[ ** ] Loading user [zarthus]
[ ** ] Loading network [freenode]
[ .. ] Loading network module [simple_away]...
[ >> ] [/home/zarthus/.local/znc/lib/znc/simple_away.so]
[ .. ] Adding server [chat.freenode.net +6697 <censored>]...
[ .. ] Loading user module [chansaver]...
[ .. ] Loading user module [controlpanel]...
[ .. ] Forking into the background...
[ >> ] [pid: 4248]
[ ** ] ZNC 1.8.x-git-1788-1eac5ce9 - https://znc.in

no password

[ ?? ] Launch ZNC now? (yes/no) [yes]: yes
[ .. ] Opening config [/tmp/znc/configs/znc.conf]...
[ .. ] Loading global module [webadmin]...
[ .. ] Binding to port [+6969]...
[ ** ] Loading user [zarthus]
[ ** ] Loading network [freenode]
[ .. ] Loading network module [simple_away]...
[ >> ] [/home/zarthus/.local/znc/lib/znc/simple_away.so]
[ .. ] Adding server [chat.freenode.net +6697]...
[ .. ] Loading user module [chansaver]...
[ .. ] Loading user module [controlpanel]...
[ .. ] Forking into the background...
[ >> ] [pid: 4305]
[ ** ] ZNC 1.8.x-git-1788-1eac5ce9 - https://znc.in

No servers

[ ** ] 
[ ?? ] Launch ZNC now? (yes/no) [yes]: yes
[ .. ] Opening config [/tmp/znc/configs/znc.conf]...
[ .. ] Loading global module [webadmin]...
[ .. ] Binding to port [+6969]...
[ ** ] Loading user [zarthus]
[ .. ] Loading user module [chansaver]...
[ .. ] Loading user module [controlpanel]...
[ .. ] Forking into the background...
[ >> ] [pid: 4334]
[ ** ] ZNC 1.8.x-git-1788-1eac5ce9 - https://znc.in
@DarthGandalf

This comment has been minimized.

Member

DarthGandalf commented Oct 13, 2018

You're parsing the server twice... Can it be parsed only once?

@Zarthus

This comment has been minimized.

Contributor

Zarthus commented Oct 14, 2018

I don't understand/know the technical complications of modifying pConfig->server directly, if that's what you mean.

Modifying content supplied in the config seems like a bad idea to me (until we want to display the sensitive information)

@DarthGandalf

This comment has been minimized.

Member

DarthGandalf commented Oct 14, 2018

Another way is to remove list of servers from output, but say only number of servers.

@Zarthus

This comment has been minimized.

Contributor

Zarthus commented Oct 14, 2018

I as an admin kind of like the verbosity of the existing output.. but I will commit that solution on top of this and you can choose which one you'd like to merge/cherry pick

fix: #1599 - Server passwords are printed during startup
(by only displaying the number of servers added)
@codecov

This comment has been minimized.

codecov bot commented Oct 14, 2018

Codecov Report

Merging #1607 into master will decrease coverage by <.01%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1607      +/-   ##
==========================================
- Coverage   37.43%   37.43%   -0.01%     
==========================================
  Files         127      127              
  Lines       31030    31009      -21     
  Branches       93       93              
==========================================
- Hits        11617    11608       -9     
+ Misses      19364    19352      -12     
  Partials       49       49
Impacted Files Coverage Δ
src/IRCNetwork.cpp 67.36% <80%> (-0.08%) ⬇️
src/Threads.cpp 89.94% <0%> (-1.19%) ⬇️
src/Config.cpp 95.83% <0%> (-0.84%) ⬇️
modules/simple_away.cpp 63.26% <0%> (-0.69%) ⬇️
src/main.cpp 48.63% <0%> (-0.42%) ⬇️
src/FileUtils.cpp 49.51% <0%> (-0.37%) ⬇️
modules/webadmin.cpp 7.14% <0%> (-0.12%) ⬇️
src/ZNCString.cpp 77.91% <0%> (-0.1%) ⬇️
src/Modules.cpp 59.33% <0%> (-0.03%) ⬇️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b00cc30...55e910d. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment