Fix #4072 by changing outdated HTTP to HTTPS calls within the codebase (#4073)

This commit is contained in:
Zach H 2020-08-23 17:24:26 -04:00 committed by GitHub
parent b0c7b9078d
commit 3536fa8a75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 8 deletions

View file

@ -128,7 +128,7 @@ void ChatView::appendCardTag(QTextCursor &cursor, const QString &cardName)
void ChatView::appendUrlTag(QTextCursor &cursor, QString url) void ChatView::appendUrlTag(QTextCursor &cursor, QString url)
{ {
if (!url.contains("://")) if (!url.contains("://"))
url.prepend("http://"); url.prepend("https://");
QTextCharFormat oldFormat = cursor.charFormat(); QTextCharFormat oldFormat = cursor.charFormat();
QTextCharFormat anchorFormat = oldFormat; QTextCharFormat anchorFormat = oldFormat;

View file

@ -1328,7 +1328,7 @@ void DlgSettings::closeEvent(QCloseEvent *event)
break; break;
case NotLoaded: case NotLoaded:
loadErrorMessage = tr("Your card database did not finish loading\n\n" 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" "cards.xml attached\n\n"
"Would you like to change your database location setting?"); "Would you like to change your database location setting?");
break; break;
@ -1342,7 +1342,7 @@ void DlgSettings::closeEvent(QCloseEvent *event)
break; break;
default: default:
loadErrorMessage = tr("Unknown card database load status\n\n" 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?"); "Would you like to change your database location setting?");
break; break;

View file

@ -32,8 +32,8 @@ void DownloadSettings::populateDefaultURLs()
downloadURLs.clear(); downloadURLs.clear();
downloadURLs.append("https://api.scryfall.com/cards/!set:uuid!?format=image&face=!prop:side!"); 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("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("https://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?name=!name!&type=card");
setValue(QVariant::fromValue(downloadURLs), "urls", "downloads"); setValue(QVariant::fromValue(downloadURLs), "urls", "downloads");
} }

View file

@ -34,7 +34,7 @@ void TappedOutInterface::queryFinished(QNetworkReply *reply)
*/ */
QString deckUrl = reply->rawHeader("Location"); QString deckUrl = reply->rawHeader("Location");
qDebug() << "Tappedout: good reply, http status" << httpStatus << "location" << deckUrl; qDebug() << "Tappedout: good reply, http status" << httpStatus << "location" << deckUrl;
QDesktopServices::openUrl("http://tappedout.net" + deckUrl); QDesktopServices::openUrl("https://tappedout.net" + deckUrl);
} else { } else {
/* /*
* Otherwise, the deck has not been parsed correctly. Error messages can be extracted * Otherwise, the deck has not been parsed correctly. Error messages can be extracted
@ -86,7 +86,7 @@ void TappedOutInterface::analyzeDeck(DeckList *deck)
QByteArray data; QByteArray data;
getAnalyzeRequestData(deck, &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"); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
manager->post(request, data); manager->post(request, data);

View file

@ -336,7 +336,7 @@ DeckList::DeckList()
root = new InnerDecklistNode; 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) DeckList::DeckList(const DeckList &other)
: QObject(), name(other.name), comments(other.comments), deckHash(other.deckHash) : QObject(), name(other.name), comments(other.comments), deckHash(other.deckHash)
{ {