Skip to content

Commit

Permalink
Fix #4072 by changing outdated HTTP to HTTPS calls within the codebase (
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeldaZach committed Aug 23, 2020
1 parent b0c7b90 commit 3536fa8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cockatrice/src/chatview/chatview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void ChatView::appendCardTag(QTextCursor &cursor, const QString &cardName)
void ChatView::appendUrlTag(QTextCursor &cursor, QString url)
{
if (!url.contains("://"))
url.prepend("http://");
url.prepend("https://");

QTextCharFormat oldFormat = cursor.charFormat();
QTextCharFormat anchorFormat = oldFormat;
Expand Down
4 changes: 2 additions & 2 deletions cockatrice/src/dlg_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ void DlgSettings::closeEvent(QCloseEvent *event)
break;
case NotLoaded:
loadErrorMessage = tr("Your card database did not finish loading\n\n"
"Please file a ticket at http://github.com/Cockatrice/Cockatrice/issues with your "
"Please file a ticket at https://github.com/Cockatrice/Cockatrice/issues with your "
"cards.xml attached\n\n"
"Would you like to change your database location setting?");
break;
Expand All @@ -1342,7 +1342,7 @@ void DlgSettings::closeEvent(QCloseEvent *event)
break;
default:
loadErrorMessage = tr("Unknown card database load status\n\n"
"Please file a ticket at http://github.com/Cockatrice/Cockatrice/issues\n\n"
"Please file a ticket at https://github.com/Cockatrice/Cockatrice/issues\n\n"
"Would you like to change your database location setting?");

break;
Expand Down
4 changes: 2 additions & 2 deletions cockatrice/src/settings/downloadsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ void DownloadSettings::populateDefaultURLs()
downloadURLs.clear();
downloadURLs.append("https://api.scryfall.com/cards/!set:uuid!?format=image&face=!prop:side!");
downloadURLs.append("https://api.scryfall.com/cards/multiverse/!set:muid!?format=image");
downloadURLs.append("http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=!set:muid!&type=card");
downloadURLs.append("http://gatherer.wizards.com/Handlers/Image.ashx?name=!name!&type=card");
downloadURLs.append("https://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=!set:muid!&type=card");
downloadURLs.append("https://gatherer.wizards.com/Handlers/Image.ashx?name=!name!&type=card");
setValue(QVariant::fromValue(downloadURLs), "urls", "downloads");
}

Expand Down
4 changes: 2 additions & 2 deletions cockatrice/src/tappedout_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void TappedOutInterface::queryFinished(QNetworkReply *reply)
*/
QString deckUrl = reply->rawHeader("Location");
qDebug() << "Tappedout: good reply, http status" << httpStatus << "location" << deckUrl;
QDesktopServices::openUrl("http://tappedout.net" + deckUrl);
QDesktopServices::openUrl("https://tappedout.net" + deckUrl);
} else {
/*
* Otherwise, the deck has not been parsed correctly. Error messages can be extracted
Expand Down Expand Up @@ -86,7 +86,7 @@ void TappedOutInterface::analyzeDeck(DeckList *deck)
QByteArray data;
getAnalyzeRequestData(deck, &data);

QNetworkRequest request(QUrl("http://tappedout.net/mtg-decks/paste/"));
QNetworkRequest request(QUrl("https://tappedout.net/mtg-decks/paste/"));
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");

manager->post(request, data);
Expand Down
2 changes: 1 addition & 1 deletion common/decklist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ DeckList::DeckList()
root = new InnerDecklistNode;
}

// TODO: http://qt-project.org/doc/qt-4.8/qobject.html#no-copy-constructor-or-assignment-operator
// TODO: https://qt-project.org/doc/qt-4.8/qobject.html#no-copy-constructor-or-assignment-operator
DeckList::DeckList(const DeckList &other)
: QObject(), name(other.name), comments(other.comments), deckHash(other.deckHash)
{
Expand Down

0 comments on commit 3536fa8

Please sign in to comment.