The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,861 other subscribers

Archive for the ‘Web Development’ Category

I’m harvesting credit card numbers and passwords from your site. Here’s how.

Posted by jpluimers on 2020/01/14

Below is one of the reasons I try to stay on the back-end side of things. Those are complex enough to focus on for me.

[WayBackI’m harvesting credit card numbers and passwords from your site. Here’s how.

It basically comes down to:

  • anything in the same page has access to anything happening on that page.
  • be careful when using npm and ad networks.
  • perform security operations in a light-weight iframe that is scrutinized.

The source of any npm package might be different from the source you find in a the underlying repository. This recursively holds for all the other npmit pulls in.

–jeroen

via: [WayBackJeroen Wiert Pluimers – Google+

Posted in Development, Power User, Security, Software Development, Web Development | Leave a Comment »

When LinkedIn throws HTTP result code 999 at you it means it does not like you

Posted by jpluimers on 2019/10/23

LinkedIn is very private about itself which means you have a hard time linking to their content.

Too bad, as they make themselves an island.

I sorted this out a while ago to see why the Press-This and other bookmarking functionalities in web-browsers would fail for LinkedIn:

[WayBackWordPress/press-this: Linked-In URLs do not parse correctly

@kraftbj I found the below ones on StackOverflow and a general sentiment from https://www.google.com/search?q=linkedin%20999%20response is “Using the invalid HTTP response 999, LinkedIn blocks vary over time depending on both UserAgent and IP address blocks including many hosting and cloud service providers”.

–jeroen

Posted in Development, Software Development, Web Development | Leave a Comment »

Research list: haproxy and Connection: close

Posted by jpluimers on 2019/09/24

At a site, haproxy was configured like this for a particular back-end:

backend http_FUNCTIONALITY_cluster
    log global
    mode http
# default httpchk checks / which for our functionality intentionally returns 500 causing haproxy to think it's down
#   option httpchk
# FUNCTIONALITY has a /FUNCTIONALITY which returns a 200 OK
    option httpchk get /FUNCTIONALITY
    http-check expect ! rstatus ^5
    option http-keep-alive
    option forwardfor
    server w7connexxion 192.168.178.42:8181 cookie FUNCTIONALITYA check

The /FUNCTIONALITY would return a multi-kilobyte result.

The HAproxy would send the request with this body:

Connection: close

In the midst of the server returning an http request of more than one TCP frame:

Connection: close
Content-Type: text/html; charset=utf-8
Content-Length: 4068
Date: Mon, 20 Nov 2017 08:17:02 GMT

<html><head><META ...

, the HAproxy would kill the connection, resulting in a 10054 error on Windows, which [WayBack] Windows Sockets Error Codes indicates it is this:

WSAECONNRESET
10054
Connection reset by peer.

An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket). This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were in progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET.

So both sides are right in that they will close the connection (despite the HTTP keep alive): [WayBack] What does “Connection: close” means when used in the response message?

Howver, I think HAproxy is way too soon closing the connection, especially as it does not use the configured keep alive ([WayBack] How to make HA Proxy keepalive and [WayBack] Hypertext Transfer Protocol — HTTP/1.1 RFC 2616 = 14 Header Field Definitions – 14.10 Connection).

The 10054 would end up in the Windows Event Log for Applications like this:

The description for Event ID 0 from source MyFunctionality.exe cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 

Socket Error # 10054
Connection reset by peer.

In the mean time, we shortened the result, so it does not fail any more.

Later I hope to find some time to do more research on this, for which I hope [WayBack] Health checking – HAProxy Technologies is a base.

–jeroen

Posted in Development, Software Development, Web Development | Leave a Comment »

CSS flex-box layout – Wikipedia

Posted by jpluimers on 2019/09/02

Being a back-end and library person by heart, I am always late in the web-UI game, so this is on my list of things to try: CSS flex-box layout – Wikipedia.

I saw it being used by [WayBack] markdownlint demo: Demo for markdownlint, a Node.js style checker and lint tool for Markdown/CommonMark files.

Some links that should me help further:

–jeroen

Read the rest of this entry »

Posted in CSS, Development, HTML, HTML5, Software Development, Web Development | Leave a Comment »

Links for another crazy idea: superimpose lane availability indicators on Google Maps

Posted by jpluimers on 2019/08/29

ANWB can superimpose the lane availability indicators on their internap maps software.

Some links so I won’t forget:

–jeroen

Read the rest of this entry »

Posted in Development, Google, GoogleMaps, Power User, Software Development, Web Development | Leave a Comment »

ls colour codes on OpenSuSE tumbleweed when accessed from Mac OS X ssh

Posted by jpluimers on 2019/06/07

`ls` colour codes

`ls` colour codes

I got confused as I thought red text would mean an error.

But they’re not: greenish yellow on a read background means error (a symbolic link to a place that’s no longer there).

It’s the output of https://github.com/gkotian/gautam_linux/blob/master/scripts/colours.sh as the one at

Actually the script is here https://raw.githubusercontent.com/gkotian/gautam_linux/master/scripts/colours.sh as the one at [WayBackcommand line – What do the different colors mean in the terminal? – Ask Ubuntu failed with errors like this one:

-bash: *.xbm: bad substitution

The full script output is below.

Since various terminals have a different mapping from colours in the ANSI escape code colour table, I used the standard HTML colours using (which slightly differs from the Terminal.app screenshot on the right):

References:

Note that the shell on Mac OS X uses a different way of configuring colours CLICOLOR as described in [WayBacksettings – CLICOLOR and LS_COLORS in bash – Unix & Linux Stack Exchange. I might cover that another day.

Script output:

Read the rest of this entry »

Posted in *nix, *nix-tools, ANSI escape code, bash, CSS, Development, Encoding, HTML, HTML5, Linux, openSuSE, Power User, Software Development, SuSE Linux, Tumbleweed, Web Development | Leave a Comment »

Firefox 29 and up: “The connection has timed out”

Posted by jpluimers on 2019/04/24

A few years ago, Firefox changed the default “network.http.response.timeout” value from zero to 300 seconds (5 minutes).

Display style systems that show refreshing web pages, this can be a problem as when the connection to the web-server is unavailable for more than 5 minutes, then the page will show “The connection has timed out” and stop refreshing.

The solution – apart from fixing each and every connection problem – is to either restore the value or make it very long:

  • network.http.response.timeout=0
  • network.http.response.timeout=30000

Changing this works similarly like in A way to skip the Firefox “Well, this is embarrassing” during a sudden reboot « The Wiert Corner – irregular stream of stuff:

  • Open Firefox
  • Type about:config in the addressbar
  • Confirm the
    This might void your warranty!
    by clicking
    I accept the risk!
  • Search for network.http.response.timeout
  • Double click it so the value changes from the default value 0 to the user set value 0

–jeroen

Via:

Posted in Development, Firefox, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »

Lesson learned: do not copy/paste code from the `Visual` WordPress.com editor…

Posted by jpluimers on 2019/04/16

[WayBack] Lesson learned: do not copy/paste code from the Visual WordPress.com editor; copy from the Text editor or the Preview… – Jeroen Wiert Pluimers – Google+.

Note: likely the HTML below got rendered badly by WordPress.com, so the gist below has the same text as a MarkDown file.

Ever wonder why copy-pasting code from your WordPress.com post fails?

The first statement fails, but the second works:

[root@linux:/etc] # useradd --create-home --shell /bin/false autossh24
useradd: unrecognized option '--shell /bin/false'
...
[root@linux:/etc] # useradd --create-home --shell /bin/false autossh24
[root@linux:/etc] #

The reason is that the first is copied from the Visual WordPress.com editor that renders this HTML inserting &nbsp; which is a different unicode characer (0x00A0) than a normal space (0x0020):

<blockquote><p><code data-mce-selected="1"># <strong>useradd --create-home --shell&nbsp;/bin/false autossh24</strong></code></p></blockquote>

However, the the second copied from the Text WordPress.com editor succeeds because it has all regular spaces:

<blockquote><code># <strong>useradd --create-home --shell /bin/false autossh24</strong></code></blockquote>

Luckily the Preview render is correct:

<blockquote><p><code># <strong>useradd --create-home --shell /bin/false autossh24</strong></code></p></blockquote>

Lesson learned: do not copy/paste code from the Visual WordPress.com editor; copy from the Text editor or the Preview.

–jeroen

[WayBackEver wonder why copy-pasting code from your WordPress.com post fails?

Read the rest of this entry »

Posted in Development, PHP, Scripting, SocialMedia, Software Development, Web Development, WordPress, WordPress | Leave a Comment »

debugging – Find what javascript changes the DOM? – Stack Overflow

Posted by jpluimers on 2019/04/01

I know I’m going to need this one day: [WayBackdebugging – Find what javascript changes the DOM? – Stack Overflow

Via: [WayBack] Javascript “Why”: Wenn ich eine fertig geladene Webseite sehe und wissen möchte, warum “dieses Element da” (Bild, Script, div) geladen worden ist, wie… – Kristian Köhntopp – Google+

–jeroen

Posted in Chrome, Development, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »

GitHub – sdsalyer/gplus-archiver: A tool for exporting content from Google+

Posted by jpluimers on 2019/02/27

[WayBack] GitHub – sdsalyer/gplus-archiver: A tool for exporting content from Google+

Example saves: [WayBack] gplus-archiver

Via:

–jeroen

Posted in Development, G+: GooglePlus, PHP, Power User, Scripting, SocialMedia, Software Development, Web Development | Leave a Comment »