1
0
Fork 0
forked from OpenNeo/impress

Update most URLs to use HTTPS

I noticed we didn't have the little lock icon in the browser, and yeah
huh there's a lot of `http://` still floating around! Let's fix that!
This commit is contained in:
Emi Matchu 2023-10-25 15:16:46 -07:00
parent 29dd353895
commit 22e3f4240a
34 changed files with 77 additions and 73 deletions

View file

@ -1,4 +1,4 @@
source 'http://rubygems.org'
source 'https://rubygems.org'
ruby '3.1.4'
gem 'rails', '~> 7.1', '>= 7.1.1'

View file

@ -5,7 +5,7 @@ GIT
RocketAMF (1.0.0)
GEM
remote: http://rubygems.org/
remote: https://rubygems.org/
specs:
actioncable (7.1.1)
actionpack (= 7.1.1)

View file

@ -344,7 +344,7 @@ var Neopia = (function ($, I18n) {
}
var itemName = this.props.item.name;
var imageSrc =
"http://pets.neopets.com/cpn/" +
"https://pets.neopets.com/cpn/" +
petName +
"/1/1.png?" +
this.appearanceQuery();

View file

@ -48,7 +48,7 @@
function loadNotable() {
// TODO: add HTTPS to notables
// $.getJSON('http://notables.openneo.net/api/1/days/ago/1?callback=?', function (response) {
// $.getJSON('https://notables.openneo.net/api/1/days/ago/1?callback=?', function (response) {
// var notables = response.notables;
// var i = Math.floor(Math.random() * notables.length);
// Preview.Job.fallback = new Preview.Job.Name(notables[i].petName);
@ -87,7 +87,7 @@
// lol lazy code for prank image :P
// TODO: HTTPS?
return (
"http://swfimages.impress.openneo.net" +
"https://swfimages.impress.openneo.net" +
"/biology/000/000/0-2/" +
key.substr(2) +
"/300x300.png"

View file

@ -1,5 +1,5 @@
function petImage(id, size) {
return 'http://pets.neopets.com/' + id + '/1/' + size + '.png';
return 'https://pets.neopets.com/' + id + '/1/' + size + '.png';
}
var PetQuery = {},

View file

@ -63,7 +63,7 @@ var DEBUG = (document.location.search.substr(0, 6) == '?debug');
}
function petThumbnailUrl(pet_name) {
return 'http://pets.neopets.com/cpn/' + pet_name + '/1/1.png';
return 'https://pets.neopets.com/cpn/' + pet_name + '/1/1.png';
}
/* Items */

View file

@ -191,7 +191,7 @@ body.campaigns-show, body.campaigns-current
width: $outfit-inner-width
&.banner
background-image: url(http://images.neopets.com/themes/004_bir_a2e60/footer_bg.png)
background-image: url(https://images.neopets.com/themes/004_bir_a2e60/footer_bg.png)
background-position: 0 -60px
border: 2px solid #006
color: white

View file

@ -92,13 +92,13 @@ module ApplicationHelper
end
JAVASCRIPT_LIBRARIES = {
:addthis => '//s7.addthis.com/js/250/addthis_widget.js#username=openneo',
:bitly => '//bit.ly/javascript-api.js?version=latest&login=openneo&apiKey=R_4d0438829b7a99860de1d3edf55d8dc8',
:html5 => '//html5shim.googlecode.com/svn/trunk/html5.js',
:jquery => '//ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js',
:jquery20 => '//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js',
:jquery_tmpl => '//ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js',
:swfobject => '//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js'
:addthis => 'https://s7.addthis.com/js/250/addthis_widget.js#username=openneo',
:bitly => 'https://bit.ly/javascript-api.js?version=latest&login=openneo&apiKey=R_4d0438829b7a99860de1d3edf55d8dc8',
:html5 => 'https://html5shim.googlecode.com/svn/trunk/html5.js',
:jquery => 'https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js',
:jquery20 => 'https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js',
:jquery_tmpl => 'https://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js',
:swfobject => 'https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js'
}
def include_javascript_libraries(*library_names)

View file

@ -13,11 +13,11 @@ module ClosetHangersHelper
end
def send_neomail_url(neopets_username)
"http://www.neopets.com/neomessages.phtml?type=send&recipient=#{CGI.escape neopets_username}"
"https://www.neopets.com/neomessages.phtml?type=send&recipient=#{CGI.escape neopets_username}"
end
def neopets_lookup_url(neopets_username)
"http://www.neopets.com/userlookup.phtml?user=#{CGI.escape neopets_username}"
"https://www.neopets.com/userlookup.phtml?user=#{CGI.escape neopets_username}"
end
def hangers_group_visibility_field_name(owned)
@ -75,7 +75,7 @@ module ClosetHangersHelper
end
def nc_icon_url
"http://#{request.host}#{image_path 'nc.png'}"
"https://#{request.host}#{image_path 'nc.png'}"
end
def petpage_closet_list_checked(closet_list, owned)

View file

@ -4,7 +4,7 @@ module ClosetPagesHelper
end
def neopets_login_url
"http://www.neopets.com/loginpage.phtml"
"https://www.neopets.com/loginpage.phtml"
end
end

View file

@ -26,7 +26,7 @@ module ContributionHelper
end
end
PET_TYPE_IMAGE_FORMAT = 'http://pets.neopets.com/cp/%s/1/3.png'
PET_TYPE_IMAGE_FORMAT = 'https://pets.neopets.com/cp/%s/1/3.png'
def contributed_pet_type(main_key, pet_type, show_image)
span = content_tag(:span, pet_type.human_name, :class => 'contributed-name')
description = translate('contributions.contributed_description.parents.pet_type_html',

View file

@ -1,18 +1,18 @@
module DonationsHelper
THANK_YOU_GREETINGS = [
'http://images.neopets.com/new_greetings/1368.gif',
'http://images.neopets.com/new_greetings/466.gif',
'http://images.neopets.com/new_greetings/48.gif',
'http://images.neopets.com/new_greetings/49.gif',
'http://images.neopets.com/new_greetings/64.gif',
'http://images.neopets.com/new_greetings/65.gif',
'http://images.neopets.com/new_greetings/66.gif',
'http://images.neopets.com/new_greetings/67.gif',
'http://images.neopets.com/new_greetings/69.gif',
'http://images.neopets.com/new_greetings/71.gif',
'http://images.neopets.com/new_greetings/72.gif',
'http://images.neopets.com/new_greetings/103.gif',
'http://images.neopets.com/new_greetings/420.gif'
'https://images.neopets.com/new_greetings/1368.gif',
'https://images.neopets.com/new_greetings/466.gif',
'https://images.neopets.com/new_greetings/48.gif',
'https://images.neopets.com/new_greetings/49.gif',
'https://images.neopets.com/new_greetings/64.gif',
'https://images.neopets.com/new_greetings/65.gif',
'https://images.neopets.com/new_greetings/66.gif',
'https://images.neopets.com/new_greetings/67.gif',
'https://images.neopets.com/new_greetings/69.gif',
'https://images.neopets.com/new_greetings/71.gif',
'https://images.neopets.com/new_greetings/72.gif',
'https://images.neopets.com/new_greetings/103.gif',
'https://images.neopets.com/new_greetings/420.gif'
]
def thank_you_greeting_url

View file

@ -2,7 +2,7 @@ module ItemsHelper
JNItemsURLFormat = 'https://items.jellyneo.net/search/?name=%s&name_type=3'
module PetTypeImage
Format = 'http://pets.neopets.com/cp/%s/%i/%i.png'
Format = 'https://pets.neopets.com/cp/%s/%i/%i.png'
Emotions = {
:happy => 1,
@ -85,19 +85,19 @@ module ItemsHelper
end
def shop_wizard_url_for(item)
"http://www.neopets.com/market.phtml?type=wizard&string=#{CGI::escape item.name}"
"https://www.neopets.com/market.phtml?type=wizard&string=#{CGI::escape item.name}"
end
def super_shop_wizard_url_for(item)
"http://www.neopets.com/portal/supershopwiz.phtml?string=#{CGI::escape item.name}"
"https://www.neopets.com/portal/supershopwiz.phtml?string=#{CGI::escape item.name}"
end
def trading_post_url_for(item)
"http://www.neopets.com/island/tradingpost.phtml?type=browse&criteria=item_exact&search_string=#{CGI::escape item.name}"
"https://www.neopets.com/island/tradingpost.phtml?type=browse&criteria=item_exact&search_string=#{CGI::escape item.name}"
end
def auction_genie_url_for(item)
"http://www.neopets.com/genie.phtml?type=process_genie&criteria=exact&auctiongenie=#{CGI::escape item.name}"
"https://www.neopets.com/genie.phtml?type=process_genie&criteria=exact&auctiongenie=#{CGI::escape item.name}"
end
def trading_closet_hangers_header(owned, count)

View file

@ -159,7 +159,7 @@ function ItemPageBadges({ item, isEmbedded }) {
}
>
{item?.ncTradeValueText && (
<LinkBadge href="http://www.neopets.com/~owls">
<LinkBadge href="https://www.neopets.com/~owls">
OWLS: {item?.ncTradeValueText}
</LinkBadge>
)}
@ -169,7 +169,7 @@ function ItemPageBadges({ item, isEmbedded }) {
{!item?.isNc && !item?.isPb && (
<LinkBadge
href={
"http://www.neopets.com/shops/wizard.phtml?string=" +
"https://www.neopets.com/shops/wizard.phtml?string=" +
encodeURIComponent(item?.name)
}
isEmbedded={isEmbedded}
@ -182,7 +182,7 @@ function ItemPageBadges({ item, isEmbedded }) {
{!item?.isNc && !item?.isPb && (
<LinkBadge
href={
"http://www.neopets.com/portal/supershopwiz.phtml?string=" +
"https://www.neopets.com/portal/supershopwiz.phtml?string=" +
encodeURIComponent(item?.name)
}
isEmbedded={isEmbedded}
@ -195,7 +195,7 @@ function ItemPageBadges({ item, isEmbedded }) {
{!item?.isNc && !item?.isPb && (
<LinkBadge
href={
"http://www.neopets.com/island/tradingpost.phtml?type=browse&criteria=item_exact&search_string=" +
"https://www.neopets.com/island/tradingpost.phtml?type=browse&criteria=item_exact&search_string=" +
encodeURIComponent(item?.name)
}
isEmbedded={isEmbedded}
@ -208,7 +208,7 @@ function ItemPageBadges({ item, isEmbedded }) {
{!item?.isNc && !item?.isPb && (
<LinkBadge
href={
"http://www.neopets.com/genie.phtml?type=process_genie&criteria=exact&auctiongenie=" +
"https://www.neopets.com/genie.phtml?type=process_genie&criteria=exact&auctiongenie=" +
encodeURIComponent(item?.name)
}
isEmbedded={isEmbedded}

View file

@ -622,7 +622,7 @@ const SWF_URL_PATTERN =
/^https?:\/\/images\.neopets\.com\/cp\/(bio|items)\/swf\/(.+?)_([a-z0-9]+)\.swf$/;
function convertSwfUrlToPossibleManifestUrls(swfUrl) {
const match = new URL(swfUrl, "http://images.neopets.com")
const match = new URL(swfUrl, "https://images.neopets.com")
.toString()
.match(SWF_URL_PATTERN);
if (!match) {
@ -636,8 +636,8 @@ function convertSwfUrlToPossibleManifestUrls(swfUrl) {
// TODO: There are a few potential manifest URLs in play! Long-term, we
// should get this from modeling data. But these are some good guesses!
return [
`http://images.neopets.com/cp/${type}/data/${folders}/manifest.json`,
`http://images.neopets.com/cp/${type}/data/${folders}_${hash}/manifest.json`,
`https://images.neopets.com/cp/${type}/data/${folders}/manifest.json`,
`https://images.neopets.com/cp/${type}/data/${folders}_${hash}/manifest.json`,
];
}

View file

@ -493,7 +493,7 @@ function getHasAnimationsForMovieAsset({ library, libraryUrl }) {
// Some movie clips require you to tick to the first frame of the movie
// before the children mount onto the stage. If we detect animations
// without doing this, we'll incorrectly say no, because we see no children!
// Example: http://images.neopets.com/cp/items/data/000/000/235/235877_6d273e217c/235877.js
// Example: https://images.neopets.com/cp/items/data/000/000/235/235877_6d273e217c/235877.js
movieClip.advance();
const movieClipHasAnimations = hasAnimations(movieClip);

View file

@ -205,7 +205,7 @@ class NeopetsPage
TYPES = {
'closet' => Type.new(
get_name: lambda { I18n.translate('neopets_page_import_tasks.names.closet') },
get_url: lambda { |index| "http://www.neopets.com/closet.phtml?per_page=50&page=#{index}" },
get_url: lambda { |index| "https://www.neopets.com/closet.phtml?per_page=50&page=#{index}" },
parser: Parser.new(
selectors: {
items: "form[action=\"process_closet.phtml\"] tr[bgcolor!=silver][bgcolor!=\"#E4E4E4\"]",
@ -220,7 +220,7 @@ class NeopetsPage
),
'safety_deposit' => Type.new(
get_name: lambda { I18n.translate('neopets_page_import_tasks.names.safety_deposit') },
get_url: lambda { |index| "http://www.neopets.com/safetydeposit.phtml?offset=#{(index - 1) * 30}" },
get_url: lambda { |index| "https://www.neopets.com/safetydeposit.phtml?offset=#{(index - 1) * 30}" },
parser: Parser.new(
selectors: {
items: "#content tr[bgcolor=\"#DFEAF7\"]",
@ -242,7 +242,7 @@ class NeopetsPage
),
'gallery' => Type.new(
get_name: lambda { I18n.translate('neopets_page_import_tasks.names.gallery') },
get_url: lambda { |index| "http://www.neopets.com/gallery/index.phtml?view=all" },
get_url: lambda { |index| "https://www.neopets.com/gallery/index.phtml?view=all" },
parser: Parser.new(
selectors: {
items: "form[name=gallery_form] td[valign=top]",

View file

@ -5,7 +5,7 @@ class NeopetsUser
include ActiveModel::Conversion
extend ActiveModel::Naming
NEOPETS_URL_ORIGIN = ENV['NEOPETS_URL_ORIGIN'] || 'http://www.neopets.com'
NEOPETS_URL_ORIGIN = ENV['NEOPETS_URL_ORIGIN'] || 'https://www.neopets.com'
GATEWAY_URL = NEOPETS_URL_ORIGIN + '/amfphp/gateway.php'
GET_PETS_METHOD = RocketAMF::RemoteGateway.new(GATEWAY_URL).
service('MobileService').action('getPets')

View file

@ -145,7 +145,7 @@ class PetState < ApplicationRecord
def artist_url
if artist_neopets_username
"http://www.neopets.com/userlookup.phtml?user=#{artist_neopets_username}"
"https://www.neopets.com/userlookup.phtml?user=#{artist_neopets_username}"
else
nil
end

View file

@ -1,5 +1,5 @@
class PetType < ApplicationRecord
IMAGE_CPN_FORMAT = 'http://pets.neopets.com/cpn/%s/1/1.png';
IMAGE_CPN_FORMAT = 'https://pets.neopets.com/cpn/%s/1/1.png';
IMAGE_CP_LOCATION_REGEX = %r{^/cp/(.+?)/[0-9]+/[0-9]+\.png$};
IMAGE_CPN_ACCEPTABLE_NAME = /^[a-z0-9_]+$/

View file

@ -150,7 +150,7 @@
-# TODO: remove me?
- content_for :stylesheets do
= stylesheet_link_tag 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.0/themes/south-street/jquery-ui.css'
= stylesheet_link_tag 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.0/themes/south-street/jquery-ui.css'
- content_for :javascripts do
= include_javascript_libraries :jquery, :jquery_tmpl

View file

@ -5,7 +5,7 @@
#intro
%p= t '.description'
%p= twl '.instructions',
:edit_petpage_link_url => 'http://www.neopets.com/edithomepage.phtml'
:edit_petpage_link_url => 'https://www.neopets.com/edithomepage.phtml'
= form_tag petpage_user_closet_hangers_path(@user), :method => :get, :id => 'petpage-closet-lists' do
= hidden_field_tag 'filter', '1'

View file

@ -1,6 +1,6 @@
- title "Needed items for #{@pet_type.human_name}"
%h2
= image_tag "http://pets.neopets.com/cpn/#{@pet_name}/1/1.png",
= image_tag "https://pets.neopets.com/cpn/#{@pet_name}/1/1.png",
:class => 'inline-image'
%span.pet-name= @pet_name
can model&hellip;
@ -11,6 +11,6 @@
= hidden_field_tag 'name', @pet_name
= submit_tag "I'm wearing one now!", :class => 'loud'
%li
= link_to 'What do I own?', 'http://www.neopets.com/closet.phtml',
= link_to 'What do I own?', 'https://www.neopets.com/closet.phtml',
:class => 'button', :target => '_blank'
= render @items

View file

@ -60,8 +60,8 @@
%noscript= submit_tag 'Go'
%ul
%li= link_to t('organization_name'), 'http://openneo.net/'
%li= link_to t('.footer.blog'), 'http://blog.openneo.net/'
%li= link_to t('organization_name'), 'https://openneo.net/'
%li= link_to t('.footer.blog'), 'https://blog.openneo.net/'
%li= link_to t('.footer.source_code'), 'https://github.com/openneo/impress'
%li= link_to t('.footer.terms'), terms_path

View file

@ -4,7 +4,7 @@
- content_for :before_flashes do
%h1
= link_to items_path do
= image_tag 'http://images.neopets.com/items/mall_floatingneggfaerie.gif'
= image_tag 'https://images.neopets.com/items/mall_floatingneggfaerie.gif'
%span= t 'infinite_closet'
- content_for :content do
= form_tag items_path, :method => :get do

View file

@ -65,7 +65,7 @@
%li
= link_to bulk_pets_path do
= image_tag 'http://images.neopets.com/items/mall_ac_garland_spotlight.gif'
= image_tag 'https://images.neopets.com/items/mall_ac_garland_spotlight.gif'
%h3= link_to t('modeling_hub'), bulk_pets_path
%div
%h4= t '.modeling_hub.tagline'

View file

@ -68,7 +68,7 @@
%script#bulk-pets-submission-template{:type => 'text/x-jquery/tmpl'}
%li.waiting
%img{:src => 'http://pets.neopets.com/cpn/${pet_name}/1/1.png'}
%img{:src => 'https://pets.neopets.com/cpn/${pet_name}/1/1.png'}
%span.name ${pet_name}
%span.waiting-message= t '.bulk_pets.waiting'
%span.loading-message= t '.bulk_pets.loading'

View file

@ -1,8 +1,8 @@
!!! XML
%urlset{:xmlns => "http://www.sitemaps.org/schemas/sitemap/0.9"}
%urlset{:xmlns => "https://www.sitemaps.org/schemas/sitemap/0.9"}
- for item in @items
%url
%loc http://#{request.host_with_port}#{url_for(item)}
%loc https://#{request.host_with_port}#{url_for(item)}
%changefreq monthly
%priority 0.5

View file

@ -49,11 +49,11 @@
Downloading currently only works for modern browsers that support the new
canvas feature. It is, however, supported in the latest versions of,
* [Google Chrome](http://www.google.com/chrome)
* [Mozilla Firefox](http://www.firefox.com/)
* [Opera](http://www.opera.com/)
* [Safari](http://www.apple.com/safari/)
* [Internet Explorer](http://www.microsoft.com/ie)
* [Google Chrome](https://www.google.com/chrome)
* [Mozilla Firefox](https://www.firefox.com/)
* [Opera](https://www.opera.com/)
* [Safari](https://www.apple.com/safari/)
* [Internet Explorer](https://www.microsoft.com/ie)
However, Internet Explorer currently is having trouble running Dress to
Impress in general, so is not recommended.

View file

@ -26,6 +26,9 @@ Rails.application.configure do
# Compress CSS using a preprocessor.
# config.assets.css_compressor = :sass
# Compress JS using a preprocessor.
config.assets.js_compressor = :terser
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false

View file

@ -1,2 +1,2 @@
source 'http://rubygems.org'
source 'https://rubygems.org'
gem 'puma', '~> 6.3'

View file

@ -1,11 +1,12 @@
GEM
remote: http://rubygems.org/
remote: https://rubygems.org/
specs:
nio4r (2.5.9)
puma (6.3.0)
nio4r (~> 2.0)
PLATFORMS
x86_64-darwin-21
x86_64-linux
DEPENDENCIES

View file

@ -50,7 +50,7 @@ namespace :pet_types do
desc "Download the Rainbow Pool data for the given locale"
task :download_basic_image_hashes => :environment do
Species.find_each do |species|
pool_url = "http://www.neopets.com/pool/all_pb.phtml"
pool_url = "https://www.neopets.com/pool/all_pb.phtml"
pool_options = {
:cookies => {:neologin => URI.encode(ENV['NEOLOGIN'])},
:params => {:lang => 'en', :f_species_id => species.id}

View file

@ -26,7 +26,7 @@ namespace :translate do
desc "Download the Rainbow Pool data for the given locale"
task :pet_attributes => :environment do
with_given_locale do |neopets_language_code|
pool_url = "http://www.neopets.com/pool/all_pb.phtml"
pool_url = "https://www.neopets.com/pool/all_pb.phtml"
pool_options = {
:cookies => {:neologin => URI.encode(ENV['NEOLOGIN'])},
:params => {:lang => neopets_language_code}