Discuss Scratch

mybearworld
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

My browser / operating system: Windows NT 10.0, Chrome 106.0.0.0, No Flash version detecteda

A combination of any quote, double or single, the tilde, and a slash, so either "~/ and '~/, result in the quote and https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac7fc52efa806cd216a370__//djangobb_forum/js/markitup/ when using the post preview.

  • This doesn't work when the smart quotes happen: “~/ ” shows as expected (and so does ‘~/ ’.)
  • This works in code blocks also.
  • This seems to not care about the BBCode, as "~[]/ looks like that link too (and so does "~[anything invalid]/).
  • The link caused by the combination is not clickable.
  • This doesn't happen with syntax highlighting:
    print("~/")
    
    That doesn't require actually being highlighted:
    @echo "~/
    @echo "~/"
    
    In both of these code blocks this effect occurs.

Last edited by mybearworld (Oct. 11, 2022 15:11:19)

Chiroyce
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

can replicate, this is definitely a bug, and may require a lot more attention
mybearworld
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

Chiroyce wrote:

(#2)
can replicate, this is definitely a bug, and may require a lot more attention
Yeah, the cause of this could be harmless or pretty severe. We'll see.

Last edited by mybearworld (June 28, 2022 12:06:27)

CST1229
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

The exact character combination that causes the replacement is "~/, which results in
"https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac7fc52efa806cd216a370__//djangobb_forum/js/markitup/
. Also, it works outside of code tags too:

EDIT: It also works with apostrophes (ignore the extension):

Last edited by CST1229 (June 28, 2022 15:17:56)

mybearworld
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

CST1229 wrote:

(#4)
The exact character combination that causes the replacement is "~/, which results in
"https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac7fc52efa806cd216a370__//djangobb_forum/js/markitup/
. Also, it works outside of code tags too:
https://assets.scratch.mit.edu/get_image/.%2E/2199f66fc7af9496b01dbca5f8542db2.png
EDIT: It also works with apostrophes (ignore the extension):
https://assets.scratch.mit.edu/get_image/.%2E/e2d4f97d0ca66eaacbbd8537ac77fef2.png
Thank you, added that information to the post, as well as something I found while adding that.
glomeromycota
Scratcher
100+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

My browser / operating system: MacOS Macintosh 12.4, Safari 15.5, No Flash version detected
Can replicate

Last edited by glomeromycota (June 28, 2022 19:47:46)

musicROCKS013
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

'~/

My browser / operating system: MacOS Macintosh X 10.11.6, Chrome 102.0.0.0, No Flash version detected

Can replicate
kccuber
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

Oh no.

That's a relative path. You can do wacky things like this:

'~/../../img/smilies/smile.png

Could this lead to XSS or something?
glomeromycota
Scratcher
100+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

kccuber wrote:

Oh no.

That's a relative path. You can do wacky things like this:

'~/../../img/smilies/smile.png

Could this lead to XSS or something?
it only works when there's an apostrophe/quote behind it

Last edited by glomeromycota (June 29, 2022 02:14:42)

ZZC12345
Scratcher
500+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

kccuber wrote:

Oh no.

That's a relative path. You can do wacky things like this:

'~/../../img/smilies/smile.png

Could this lead to XSS or something?
It's probably just a typo in a RegExp somewhere, so probably not. It's just a harmless non-clickable url.

Does anyone know why the resource at that URL redirects you to the old cdn's 8080 port and doesn't use the standard 80 or 443?
mybearworld
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

Bump, still works
Knightbot63
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

'~/ can replicate, that's just so weird for the forums to do that.


My browser / operating system: ChromeOS 14909.100.0, Chrome 104.0.0.0, No Flash version detected
mybearworld
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

Bump, still applies
mybearworld
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

This doesn't happen with syntax highlighting:
print("~/") # looks normal
Dahipuri
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

"~/ '~/ nothing happened

Last edited by Dahipuri (Oct. 8, 2022 10:31:10)

mybearworld
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

Purvitekriwal wrote:

(#15)
"~/ '~/ nothing happened
Huh, that's weird. Did you click on the check mark?
RED-001-alt
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

bump
Dahipuri
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

mybearworld wrote:

Purvitekriwal wrote:

(#15)
"~/ '~/ nothing happened
Huh, that's weird. Did you click on the check mark?
Yes
mybearworld
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

That's weird. So it doesn't look like this:
Dahipuri
Scratcher
1000+ posts

'~/ or "~/ turns into https://cdn.scratch.mit.edu/scratchr2/static/__9209616f20ac... in the post preview

mybearworld wrote:

That's weird. So it doesn't look like this:
Not for me. I will try using my other device

Last edited by Dahipuri (Oct. 11, 2022 15:06:31)

Powered by DjangoBB