Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Remove double quotes when saving wallet password to file #6035

Merged
merged 1 commit into from
Oct 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion programs/cleos/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2561,8 +2561,10 @@ int main( int argc, char** argv ) {
std::cout << fc::json::to_pretty_string(v) << std::endl;
} else {
std::cerr << localized("saving password to ${filename}", ("filename", password_file)) << std::endl;
auto password_str = fc::json::to_pretty_string(v);
boost::replace_all(password_str, "\"", "");
std::ofstream out( password_file.c_str() );
out << fc::json::to_pretty_string(v);
out << password_str;
}
});

Expand Down