Skip to content

Commit

Permalink
Fix set avatar http call, to avoid SSL errors (#12790)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosSpessatto authored and rodrigok committed Dec 20, 2018
1 parent be9d7ae commit 7251cb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rocketchat-lib/server/functions/setUserAvatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RocketChat.setUserAvatar = function(user, dataURI, contentType, service) {
let result = null;

try {
result = HTTP.get(dataURI, { npmRequestOptions: { encoding: 'binary' } });
result = HTTP.get(dataURI, { npmRequestOptions: { encoding: 'binary', rejectUnauthorized: false } });
} catch (error) {
if (!error.response || error.response.statusCode !== 404) {
console.log(`Error while handling the setting of the avatar from a url (${ dataURI }) for ${ user.username }:`, error);
Expand Down

0 comments on commit 7251cb9

Please sign in to comment.