Unable to upload image due to misconfigured CORS
-
Step 1: Edit Profile
Step 2: Change Picture
Step 3: Upload New Picture From URL
Step 4: https://i.imgur.com/yBOFkPD.png
Step 5: Upload Picture
Step 6: Crop and upload
https://i.imgur.com/GtGr1Eu.png
-
paging @barisu @julianlam
-
@pie_flavor said in Unable to upload image due to misconfigured CORS:
paging @barisu @julianlam
Does imgur allow CORS requests from what.thedailywtf.com?
Nothing to see here...
-
@Tsaukpaetra That shouldn't matter. CORS should only be for AJAX requests. If you're requesting an image via AJAX, you're
-
@pie_flavor
This has been reported and fixed in https://github.com/NodeBB/NodeBB/issues/7024Looks like it's slated for includance in 1.11.1, not sure that we've pulled it yet.
-
@izzion said in Unable to upload image due to misconfigured CORS:
@pie_flavor
This has been reported and fixed in https://github.com/NodeBB/NodeBB/issues/7024Looks like it's slated for includance in 1.11.1, not sure that we've pulled it yet.
Nope.
-
@boomzilla That upgrade link is broken. There's your problem.
-
Update: It no longer offers the ability to crop the picture, and goes straight to error.
-
@pie_flavor said in Unable to upload image due to misconfigured CORS:
Update: It no longer offers the ability to crop the picture, and goes straight to error.
Progress!
-
Just in case, let's ping @julianlam again.
-
Update: the image now appears in the box for a split second, and then it goes straight to error. @julianlam @barisu
-
@pie_flavor Testing
e: Should've gone back and read the OP to know what he's talking about before posting this
-
@hungrier said in Unable to upload image due to misconfigured CORS:
Should've gone back and read the OP to know what he's talking about before posting this
-
@pie_flavor said in Unable to upload image due to misconfigured CORS:
Update: It no longer offers the ability to crop the picture, and goes straight to error.
That was the intentionally chosen resolution to the issue, to provide an indication that it wasn't going to work at the beginning of the process, rather than letting you crop it and then failing out.
-
@izzion Moronicity in triplicate. Why have the URL button in the first place if it doesn't work?
-
@pie_flavor
Not NodeBB's problem that you're trying to hotlink to an image that isn't marked for CORS support
-
@izzion You mean the website has to be specifically configured to allow WTDWTF to access it?
If Imgur links don't work then there's no point in having the damn thing.
-
@pie_flavor
Yeah, basically all websites have the option to set their Cross-Origin Resource Sharing (CORS) policies via a header, to specify whether they'll allow all or specific domains to access resources from their domain directly. It's mostly used as a browser security thing to prevent certain links that lead to XSS-y type behaviors or to control hotlinking, and NodeBB is designed to honor that setting when you're uploading an avatar from a web URL.To work around it, saving the image locally and uploading it directly will work. Alternatively, the target domain's admin team needs to set their CORS policy to allow what.thedailywtf.com (or, more realistically, to allow
*
so that CORS is available for all resources in question).
-
Or you retrieve the image serverside and then present it to the user. Presto, all CORS problems solved.
-
@izzion Problem there is that apparently Imgur does allow CORS. And the error persists even when I run it through a CORS proxy. So I'm going to bet that the CORS is working just fine and there's actually just a bug in the code.
-
@pie_flavor imgr broke hotlinking for a lot of sites. Intentionally. If it's not in your cache, you can't see it. Basically, they don't want anyone hot linking to pictures on their site.
-
@Benjamin-Hall said in Unable to upload image due to misconfigured CORS:
Basically, they don't want anyone hot linking to pictures on their site.
Isn't that what Imgur was made for?
-
@loopback0 said in Unable to upload image due to misconfigured CORS:
@Benjamin-Hall said in Unable to upload image due to misconfigured CORS:
Basically, they don't want anyone hot linking to pictures on their site.
Isn't that what Imgur was made for?
You're probably supposed to link to the HTML page containing the ads?
No clue if there's ads, I don't think I've ever seen an imgur pic not embedded directly, but it tends to be a safe bet.
-
@PleegWat said in Unable to upload image due to misconfigured CORS:
You're probably supposed to link to the HTML page containing the ads?
It literally provides you the BB codes to hot link.
I use Imgur because it makes that easy - I'll need to revisit if it's going to stop it.
I thought it was created for linking images to Reddit etc - maybe it's lost traffic since Reddit introduced their own hosting.
-
@loopback0 from another forum which had these problems, it seems that imgur did it selectively. Basically blacklisted some referrers.
-
I think I've solved (part) of the problem:
-
@loopback0 said in Unable to upload image due to misconfigured CORS:
@Benjamin-Hall said in Unable to upload image due to misconfigured CORS:
Basically, they don't want anyone hot linking to pictures on their site.
Isn't that what Imgur was made for?
Sharing, yes, hotlinking, no.
-
@Benjamin-Hall said in Unable to upload image due to misconfigured CORS:
@loopback0 from another forum which had these problems, it seems that imgur did it selectively. Basically blacklisted some referrers.
I know they banned a favorite fanfiction site from using embeds or anything at all a while ago. Methinks someone at ImGur was just prejudiced against ponies.
-
@Tsaukpaetra Fanfiction crosses the line from 'discussion' to 'content'. At that point you're doing what they said not to do.
-
@pie_flavor said in Unable to upload image due to misconfigured CORS:
@Tsaukpaetra Fanfiction crosses the line from 'discussion' to 'content'. At that point you're doing what they said not to do.
Except that embeds primarily happened on comments by users, natch.
-
@Tsaukpaetra said in Unable to upload image due to misconfigured CORS:
When you can't be bothered to find a typeface that uses its em-height more efficiently so you just cram the lines together instead
-
@Tsaukpaetra Then the fanfiction site should have disabled imgur embedding on stories.
-
@pie_flavor said in Unable to upload image due to misconfigured CORS:
@Tsaukpaetra Then the fanfiction site should have disabled imgur embedding on stories.
People went elsewhere for there memeing, and imgur lost their business with them. The world keeps turning.
-
Imgur's been going down the drain lately, anyway. They used to just be a simple image hosting service, until they started seeing themselves as the next 9gag and they decided to overhaul everything.
Their mobile website is worst: this used to have a decent upload area. Then they suddenly removed that and forced you to install an app instead.
-
Here's an Imgur mirror...