Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Warbird posted:


While I'm here, what's considered the sane way to push files to your box? I've got a domain I'm using for just piddling around, but I'd prefer to have the editor hook into the files on the box as opposed to messing around and then waiting for WinSCP transfer everything in place. Is that a thing? I know it's a drat good way to break a site, but I'm not concerned about that.

Become a disturbed person like me who uses VIM as their development environment. Just SSH onto the box, pull your dotfiles down from your repo, and it's just like home! :shepface:

Adbot
ADBOT LOVES YOU

TheCog
Jul 30, 2012

I AM ZEPA AND I CLAIM THESE LANDS BY RIGHT OF CONQUEST

Lumpy posted:

Become a disturbed person like me who uses VIM as their development environment. Just SSH onto the box, pull your dotfiles down from your repo, and it's just like home! :shepface:

How do you even learn to use VIM? Every time I see someone use it I'm impressed at how the hell they work comfortably with it.

Warbird
May 23, 2012

America's Favorite Dumbass

Munkeymon posted:

If WinSCP's in-place editing is too slow for your liking, I'm not sure how anything else would be better.

I've seen descriptions of mirroring a Git repo or something. Heck, I know you can host a basic site on github, would there be a way to host the files in a Git repo and just point the site to that? I tend to break everything horribly every time I touch a command prompt, so that may not be the best option. There's also tools for hooking up VSCode (or the editor of your choice) to the box via FTP, but I'm having mixed results. WinSCP uploads may suffice. We'll see.

Lumpy posted:

Become a disturbed person like me who uses VIM as their development environment. Just SSH onto the box, pull your dotfiles down from your repo, and it's just like home! :shepface:

I'm a "decided to run a webserver from scratch on Debian instead of the prebaked Ubuntu image for fun(?)" level of disturbed, not VIM disturbed.

Warbird fucked around with this message at 17:28 on Jan 9, 2017

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Warbird posted:

I've seen descriptions of mirroring a Git repo or something. Heck, I know you can host a basic site on github, would there be a way to host the files in a Git repo and just point the site to that? I tend to break everything horribly every time I touch a command prompt, so that may not be the best option. There's also tools for hooking up VSCode (or the editor of your choice) to the box via FTP, but I'm having mixed results. WinSCP uploads may suffice. We'll see.

Yeah, you can configure an editor plugin to do your uploads automagically, and WinSCP can be configured to do that, too. just set up VSCode as the default external editor (in binary transfer mode!) and it should Just Work when you double-click a file in the UI. There's also directory mirroring, if you want/need the whole bundle.

I don't say this to dissuade you from finding a solution you like more, just to point out that the tool you're using already can do that if you want it to. Also, you mentioned speed and nothing you can install is going to make the network faster :)

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

TheCog posted:

How do you even learn to use VIM? Every time I see someone use it I'm impressed at how the hell they work comfortably with it.

I cannot fathom working in anything else (unless it has a really, really, good VIM-mode / plugin) You just say "Okay me, for the next three weeks, I'm going to be slow as poo poo and swearing constantly" and Just Use It™. Then after that, it's wired into your muscle memory and you can fly. It's insanely powerful and customizable, but that comes at the price of it having a steeeeeep learning curve (cliff) and having to constantly delete VIM commands you type in the middle of text done in non-VIM places. If I had a dollar for every post on the forums I've had to delete the jkwq at the end....

Warbird
May 23, 2012

America's Favorite Dumbass

Munkeymon posted:

Yeah, you can configure an editor plugin to do your uploads automagically, and WinSCP can be configured to do that, too. just set up VSCode as the default external editor (in binary transfer mode!) and it should Just Work when you double-click a file in the UI. There's also directory mirroring, if you want/need the whole bundle.

I don't say this to dissuade you from finding a solution you like more, just to point out that the tool you're using already can do that if you want it to. Also, you mentioned speed and nothing you can install is going to make the network faster :)

I had no idea it could do all of that. If so, then that's likely exactly what I want. Thanks!

Lumpy posted:

I cannot fathom working in anything else (unless it has a really, really, good VIM-mode / plugin) You just say "Okay me, for the next three weeks, I'm going to be slow as poo poo and swearing constantly" and Just Use It™. Then after that, it's wired into your muscle memory and you can fly. It's insanely powerful and customizable, but that comes at the price of it having a steeeeeep learning curve (cliff) and having to constantly delete VIM commands you type in the middle of text done in non-VIM places. If I had a dollar for every post on the forums I've had to delete the jkwq at the end....

I assume that's the Linux/Unix/whatever version of Regex? An absolute pain in the rear end to use/learn, but REALLY REALLY good once you get used to it?

Warbird fucked around with this message at 18:40 on Jan 9, 2017

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Warbird posted:

An absolute pain in the rear end to use/learn, but REALLY REALLY good once you get used to it?

That pretty much sums up VIM perfectly.

EDIT: VIM is a text editor, not a Regex library. It's easy to use regexes in VIM though!

Lumpy fucked around with this message at 18:49 on Jan 9, 2017

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Another option is WebStorm (I use PyCharm which is WebStorm + Python). It's got really great remote editing support. It's pretty much transparent along with a bunch of tools to make it seem like you're editing and viewing your results locally.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
I suppose this is more a question of web design though I'm no designer.
I got a request to move our pagination (and who knows what else) from the right edge by 1rem, all because of the optional scrollbars in macOS.

Personally I think this is a flaw with macOS scrollbars, not our site. Though of course this comes from Creative, who all use Macs and of course Apple can do no wrong. Has anyone else experienced this?

The Fool
Oct 16, 2003


Both Sublime Text and Atom have SCP plugins so that you can look at your server's directory tree right on the side bar within your text editor.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

The Merkinman posted:

I suppose this is more a question of web design though I'm no designer.
I got a request to move our pagination (and who knows what else) from the right edge by 1rem, all because of the optional scrollbars in macOS.

Personally I think this is a flaw with macOS scrollbars, not our site. Though of course this comes from Creative, who all use Macs and of course Apple can do no wrong. Has anyone else experienced this?

Regardless of your opinions of Apple, Creatives, and said Creatives' opinion of Apple, it is common to have to make changes to sites based on usability concerns due to something not under your control. What you think (for better or worse) doesn't matter. If Company Z does something that makes some % of your users experience worse, you make the change.

Here is an article about the issue you are referencing: https://css-tricks.com/designing-show-scroll-bars/

Warbird
May 23, 2012

America's Favorite Dumbass

The Fool posted:

Both Sublime Text and Atom have SCP plugins so that you can look at your server's directory tree right on the side bar within your text editor.

VSCode has a couple I've been piddling with to mixed success. Server side tweaking is needed (I think), but I'm going to need to back up everything before I start that. Work's network is weird and WinSCP already works, so I'll likely go with that.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



I like having something separate from the text editor doing the file transfers because that'll work seamlessly with images, too.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

TheCog posted:

How do you even learn to use VIM? Every time I see someone use it I'm impressed at how the hell they work comfortably with it.

Step 1 is to play Nethack using "roguelike" cursor keys.

Step 2 is to be completely insane.

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION

FateFree posted:

Sooo I am building a dashboard for a client, and he wants to implement SSO but of course, the sites we are linking to don't have SSO. What he's asking is for me to inject the login form of the site into html on our page, prepopulate the username and password, submit the form via javascript, and then open up an iframe with a link to the actual page in question. Then in theory they should be logged in and able to access the site as if they went to the login page themselves.

1st question - is this even possible? Before you say anything, yes I know how hideously ugly and stupid this is, especially injecting username/password values of clients into the html of the page. But would it work? Actually this is my only question. Would there be cross-site restrictions on submitting forms like this? Any info would be appreciated.

That's not even close to SSO. You would still have to separately sign in to each individual service. What problem is this solving exactly?

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Scaramouche posted:

Step 1 is to play Nethack using "roguelike" cursor keys.

Step 2 is to be completely insane.

This also describes VIM very well.

Knifegrab
Jul 30, 2014

Gadzooks! I'm terrified of this little child who is going to stab me with a knife. I must wrest the knife away from his control and therefore gain the upperhand.
So I am pretty new to the whole SSL thing. I got a komodo ssl cert from namecheap for a couple bucks. I am currently in the process of transferring my old domain to namecheap as well so I can't quite redirect to my new site.

In the meantime I put the site up and its accessible directly through the IP. It is using express and it is loading the keys, certs, and ca bundle, but when I go to the site it is still telling me that the site is untrusted, I am not quite sure where I have went wrong. Does the site need to be accessed via dns for the cert to be seen as valid?

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Knifegrab posted:

So I am pretty new to the whole SSL thing. I got a komodo ssl cert from namecheap for a couple bucks. I am currently in the process of transferring my old domain to namecheap as well so I can't quite redirect to my new site.

In the meantime I put the site up and its accessible directly through the IP. It is using express and it is loading the keys, certs, and ca bundle, but when I go to the site it is still telling me that the site is untrusted, I am not quite sure where I have went wrong. Does the site need to be accessed via dns for the cert to be seen as valid?

Yes, certs bought for a domain will only work for the DNS name.

EDIT: for anyone looking to do SSL easy and free, check out Let's Encrypt. https://letsencrypt.org

Lumpy fucked around with this message at 12:14 on Jan 10, 2017

toiletbrush
May 17, 2010
I'm developing a website for a Chinese client - they're expecting us to lead on a lot of the technical side of things, which is fine, but one thing I'm not sure about is passwords. Should passwords on a Chinese site (or any site, for that matter) allow the use of Chinese characters? I've found this article, but not much else.

Knifegrab
Jul 30, 2014

Gadzooks! I'm terrified of this little child who is going to stab me with a knife. I must wrest the knife away from his control and therefore gain the upperhand.
Awesome thanks Lumpster. Has anyone dealt with donation systems for sites that are provided free of charge? Obviously ads work for recouping cost but I was thinking of implementing a donation system for a client but I am not sure which one makes the most sense for a service that is largely the same over time. Patreon seems like the obvious choice but also not quite a right fit.

FateFree
Nov 14, 2003

The Wizard of Poz posted:

That's not even close to SSO. You would still have to separately sign in to each individual service. What problem is this solving exactly?

Well yes I the developer would be signing into to each service, not the user. From their perspective they log in one time and have access to multiple services.

Warbird
May 23, 2012

America's Favorite Dumbass

Knifegrab posted:

So I am pretty new to the whole SSL thing. I got a komodo ssl cert from namecheap for a couple bucks. I am currently in the process of transferring my old domain to namecheap as well so I can't quite redirect to my new site.

In the meantime I put the site up and its accessible directly through the IP. It is using express and it is loading the keys, certs, and ca bundle, but when I go to the site it is still telling me that the site is untrusted, I am not quite sure where I have went wrong. Does the site need to be accessed via dns for the cert to be seen as valid?

Oh hey, you're me from a couple of weeks back. Let me know if you need a hand sorting that out, I think I can find the walkthrough I used to finally get things working again.

toiletbrush posted:

I'm developing a website for a Chinese client - they're expecting us to lead on a lot of the technical side of things, which is fine, but one thing I'm not sure about is passwords. Should passwords on a Chinese site (or any site, for that matter) allow the use of Chinese characters? I've found this article, but not much else.

Mrs. Warbird is a Chinese national, so I can ask her what common practice is over there if it would be of any use.

lunar detritus
May 6, 2009


toiletbrush posted:

I'm developing a website for a Chinese client - they're expecting us to lead on a lot of the technical side of things, which is fine, but one thing I'm not sure about is passwords. Should passwords on a Chinese site (or any site, for that matter) allow the use of Chinese characters? I've found this article, but not much else.

Shouldn't passwords allow anything?

blunt
Jul 7, 2005

toiletbrush posted:

I'm developing a website for a Chinese client - they're expecting us to lead on a lot of the technical side of things, which is fine, but one thing I'm not sure about is passwords. Should passwords on a Chinese site (or any site, for that matter) allow the use of Chinese characters? I've found this article, but not much else.


Surely as long as the page and the database are both set to UTF-8 you should be good to go with whatever english/chinese characters someone chooses to use?

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen
Yeah, 'cos you're only going to be storing a salted hash right? Right?

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Lumpy posted:

Regardless of your opinions of Apple, Creatives, and said Creatives' opinion of Apple, it is common to have to make changes to sites based on usability concerns due to something not under your control. What you think (for better or worse) doesn't matter. If Company Z does something that makes some % of your users experience worse, you make the change.

Here is an article about the issue you are referencing: https://css-tricks.com/designing-show-scroll-bars/
Maybe it's just that I feel if Windows did something like that (which accounts for more visits and revenue than macOS), our Creative team wouldn't care and nothing would happen.

toiletbrush
May 17, 2010

Warbird posted:

Mrs. Warbird is a Chinese national, so I can ask her what common practice is over there if it would be of any use.
Thank you!

gmq posted:

Shouldn't passwords allow anything?
My instinct was yes, allowing Chinese characters and other Unicode characters would allow more secure passwords. I just wanted to make sure there were no other concerns, like input methods for those characters not always being available or being vulnerable to shoulder surfers, or encoding issues - can I guarantee that a Chinese character password entered on one browser will always hash to the same bytes as when submitted to log in on another browser, possibly in a different country? I'm a bit of a unicode noob so these might be dumb questions.

blunt posted:

Surely as long as the page and the database are both set to UTF-8 you should be good to go with whatever english/chinese characters someone chooses to use?
Our backend and db use a consistent encoding, so we're ok, the problem is more the website, which is being developed by our client and whatever frameworks and languages they are using.

Warbird
May 23, 2012

America's Favorite Dumbass

She says they typically use roman characters. Also, she doesn't think that Chinese characters would work if they tried. My understanding is that the younger app generation is pretty used to using roman inputs. Generally they're using a semi Hiragana styled phonetic input with roman characters ('Ni hao' would resolve to 你好), so you dealing with Chinese characters isn't too likely. You'd probably want to include it regardless though.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

The Merkinman posted:

Maybe it's just that I feel if Windows did something like that (which accounts for more visits and revenue than macOS), our Creative team wouldn't care and nothing would happen.

Possible, but hopefully Windows doesn't implement stupid scrollbars like that. (I agree 100% that that it's a stupid "feature" for the OS to have.) Or maybe they would be all over fixing Windows stuff... no sense brining animosity to a situation that doesn't need it.

Either way, this change might actually be a good thing, as having a UI target so small that the width of the scrollbar can hide it was probably an annoyance anyway. Now let us all hope the OS X (or macOS now I guess?) team removes that thing soon and doesn't replace it with something dumber.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



toiletbrush posted:

My instinct was yes, allowing Chinese characters and other Unicode characters would allow more secure passwords. I just wanted to make sure there were no other concerns, like input methods for those characters not always being available or being vulnerable to shoulder surfers, or encoding issues - can I guarantee that a Chinese character password entered on one browser will always hash to the same bytes as when submitted to log in on another browser, possibly in a different country? I'm a bit of a unicode noob so these might be dumb questions.

Our backend and db use a consistent encoding, so we're ok, the problem is more the website, which is being developed by our client and whatever frameworks and languages they are using.

You're correct that allowing the full Unicode set is good for security and picking characters that are hard to enter is up to your users. I might use emojis in passwords if they weren't a PITA to enter on a desktop but that's on me, as it should be.

Your main concern would be inconsistent normalization across clients talking to your back-end, depending on how your back-end (including your chosen password salt+hash library) is handling them.

toiletbrush
May 17, 2010
Normalization is what I'm most worried about, I was a bit sloppy with my language. The front-end site is being developed by our client, and I know they are using Sitecore, but not much else.

Thanks all.

MrMoo
Sep 14, 2000

toiletbrush posted:

I'm developing a website for a Chinese client - they're expecting us to lead on a lot of the technical side of things, which is fine, but one thing I'm not sure about is passwords. Should passwords on a Chinese site (or any site, for that matter) allow the use of Chinese characters? I've found this article, but not much else.

Numbers are a popular alternative for many language challenges with the Chinese universe.

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION

FateFree posted:

Well yes I the developer would be signing into to each service, not the user. From their perspective they log in one time and have access to multiple services.

How is that possible? Are they using the same username/password for every service??

putin is a cunt fucked around with this message at 04:18 on Jan 11, 2017

Knifegrab
Jul 30, 2014

Gadzooks! I'm terrified of this little child who is going to stab me with a knife. I must wrest the knife away from his control and therefore gain the upperhand.
So I have started using OpenID authentication for a site I am building. There are lots of interactions that can only be done if you are authenticated, and when you attempt one and you are not authenticated I open a new tab for the openid login, then upon successful login I close the tab and return the user to the original tab. That way if thehy have written a lengthy post they don't lose their content.

The problem is, I have no idea how to then get the client to update their user badge. I can update it when they attempt to do an authenticated action again, or I can poll but unless I am polling extremely frequently there is a good chance the user will think they are not properly logged in as there may be a delay between the badge updating.

I'd use socket.io (I am running node.js, passport with a postgres session store) but I don't want to send a refresh auth to every client connected to the site.

Is there anyway to make an action that happens in a different tab affect a tab that is already open? I just need something to to make it so when the other tab's login is successful the original page is triggered to perform a new ajax request (again a full refresh would harm the user experience).

Impotence
Nov 8, 2010
Lipstick Apathy
If both are on the same domain (same entire host and port) you can probably do some localstorage/postmessage fuckery.

I'm almost certain that if you modify localstorage it'll fire the modified storage event on all tabs

Knifegrab
Jul 30, 2014

Gadzooks! I'm terrified of this little child who is going to stab me with a knife. I must wrest the knife away from his control and therefore gain the upperhand.

Biowarfare posted:

If both are on the same domain (same entire host and port) you can probably do some localstorage/postmessage fuckery.

I'm almost certain that if you modify localstorage it'll fire the modified storage event on all tabs

Not sure what you mean but the openid is on an external site, also not using local storage.

Warbird
May 23, 2012

America's Favorite Dumbass

Came across something odd tonight. It appears that depending on how one of my domains is accessed, apache serves one of two different sites.
http://dontdothisto.me renders the piddling around site I want it to.
https://dontdothisto.me redirects to my blog (don't bother reading it, it's terrible) on a different virtual host and domain. This should also prompt you with how the SSL cert is broken and how I'm trying to steal your info.

That doesn't bother me too much, but it seems semi-random which a browser will try to access. I suspect it's something to do with how I have the virtual host set up for the blog (got a fancy cert for free; might as well use it) and now it redirects to it for whatever reason. I don't get why a call for one domain would cause the other to fire off though.


The Wizard of Poz posted:

How is that possible? Are they using the same username/password for every service??

I was going to say "Wechat", but you're not talking about the Chinese password stuff. It's insane how literally everything over there uses it.

Knifegrab
Jul 30, 2014

Gadzooks! I'm terrified of this little child who is going to stab me with a knife. I must wrest the knife away from his control and therefore gain the upperhand.
So I am just doing the openid auth on the main page, not mucking about with tabs.

My problem is I cannot get the passport logic to redirect back to my original page. When you click login it goes to a login route, but I cannot get the url the browser was at before it goes to the login route (which then redirects to teh OpenID url). I cannot call this in axios or other XMLHTTP requests because those are rejected from redirecting because of CORS. So I have to call the redirect with a window.href. But it doesn't seem like there is a safe or consistent way to pass that href a url query parameter (which I could then store in my session and return to it after authentication).

Any ideas?

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker
POST the url of the current page, log in, redirect to the url?

Adbot
ADBOT LOVES YOU

FateFree
Nov 14, 2003

The Wizard of Poz posted:

How is that possible? Are they using the same username/password for every service??

Yessir, these aren't external services though they are all separate applications within their intranet that I guess they purchased or something. Anyway it seems to work if I just post a form to a hidden iframe on the page soo, good enough!

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply