profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/presbrey/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

ericprud/SWObjects 13

Semantic Web swiss army knife C++ libraries

presbrey/nginx-auth-request-ldap 8

LDAP auth request backend for nginx (1.5.4+)

presbrey/goraptor 2

Go bindings for RDF C library

presbrey/kyototycoon-munin-plugins 1

collect kyototycoon rpc metrics with munin

presbrey/mirrorlist-proxy 1

prepend your own server to mirrorlists

presbrey/afsdav 0

AFS WebDAV Gateway

presbrey/cli53 0

Command line tool for Amazon Route 53

create barnchlinkeddata/rdflib.js

branch : dependabot/npm_and_yarn/lodash-4.17.21

created branch time in 16 minutes

PR opened linkeddata/rdflib.js

Bump lodash from 4.17.20 to 4.17.21

Bumps lodash from 4.17.20 to 4.17.21. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/lodash/lodash/commit/f299b52f39486275a9e6483b60a410e06520c538"><code>f299b52</code></a> Bump to v4.17.21</li> <li><a href="https://github.com/lodash/lodash/commit/c4847ebe7d14540bb28a8b932a9ce1b9ecbfee1a"><code>c4847eb</code></a> Improve performance of <code>toNumber</code>, <code>trim</code> and <code>trimEnd</code> on large input strings</li> <li><a href="https://github.com/lodash/lodash/commit/3469357cff396a26c363f8c1b5a91dde28ba4b1c"><code>3469357</code></a> Prevent command injection through <code>_.template</code>'s <code>variable</code> option</li> <li>See full diff in <a href="https://github.com/lodash/lodash/compare/4.17.20...4.17.21">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+3 -3

0 comment

1 changed file

pr created time in 16 minutes

startedmelvincarvalho/gitlama

started time in an hour

created repositorymelvincarvalho/gitlama

gitlama

created time in an hour

push eventemersion/go-message

Simon Ser

commit sha b5087f96b4490af1fee46a3e81b4d1f71c9cacfe

mail: fix typo in Header.Copy doc comment

view details

push time in 8 hours

push eventemersion/go-message

Simon Ser

commit sha aa9e260a918669fd19f4343ecd599e2a39779d22

Bump minimum Go version to 1.14 We can now remove the regexp hack for date parsing.

view details

push time in 8 hours

push eventemersion/go-message

Simon Ser

commit sha b8e6a9c78a87187595cf8ba422e3b387e60f1e22

Add HeaderFromMap

view details

Simon Ser

commit sha b7590ae01a554cf0059ac38b3b4458f1fc352194

textproto: add Header.Map

view details

push time in 9 hours

PR opened emersion/go-message

Add HeaderFromMap
+52 -3

0 comment

4 changed files

pr created time in 10 hours

create barnchemersion/go-message

branch : header-from-map

created branch time in 10 hours

push eventemersion/go-message

Simon Ser

commit sha c49ea04871e0dee8d5f59e1877e0ce70b857b8f6

textproto: misc doc & style cleanup

view details

Simon Ser

commit sha 57423a7adbdf01d66f12551c3be8837ca8ec47fa

go fmt

view details

push time in 10 hours

push eventemersion/go-message

Simon Ser

commit sha 3fb0148294d18c22fa581c2f2eee441d60ca19e4

ci: drop codecov

view details

push time in 10 hours

issue openedlinkeddata/rdflib.js

Does not properly process 8-bit unicode escape sequences on string literals

This is an extension of this issue on N3.js which does process 8-bit unicode escape sequences properly: https://github.com/rdfjs/N3.js/issues/248. There is also a test suite to test this: https://github.com/w3c/rdf-tests/pull/65.

Problem 1: Strange backslashes when writing to a Pod.

Let's say I want to PATCH the following triple to my POD <https://pod.example/chat1.ttl#message1> <http://rdfs.org/sioc/ns#content> "Here's my emoji: 😊".

Parsing this using n3 turns this into <https://pod.example/chat1.ttl#message1> <http://rdfs.org/sioc/ns#content> "Here's my emoji: \\U0001f60a". Or at least that's what you would want to write to a Pod.

Running the following code

function patchToPod(uri: string, dataset: DatasetCore) {
  const writer = new Writer({ format: "N-Triples" });
  for (const quad of dataset) {
    writer.addQuad(quad);
  }
  writer.end(async (error, parsedString: string) => {
    // Parsed String is `<https://pod.example/chat1.ttl#message1> <http://rdfs.org/sioc/ns#content> "Here's my emoji: \U0001f60a".`
    fetch(uri, {
      method: "PATCH",
      body: `INSERT { ${parsedString} }`,
      headers: { 'content-type': 'application/sparql-update' }
    })
  });
}

causes the following to be written to the Pod on NSS:

@prefix : <#>.
@prefix ch: <https://pod.example/chat1.ttl#>.
@prefix n: <http://rdfs.org/sioc/ns#>.

ch:message1 n:content "Here's my emoji: \uf60a".

Notice that instead of \U0001F60A it's \uf60a. I'm not 100% sure why this is because I'm not super versed in escape codes, but @RubenVerborgh believes this is a problem with rdflib.js on NSS.

Adding an additional slash to the parsed string in the code above fixes it:

fetch(uri, {
  method: "PATCH",
  body: `INSERT { ${parsedString.replace(`\\U`, `\\\\U`)} }`,
  headers: { 'content-type': 'application/sparql-update' }
})

However, @RubenVerborgh confirmed that adding these backslashes shouldn't be required.

Problem 2: Solid Clients don't understand 8-bit unicode escape sequences

When a unicode escape sequence is correctly formatted in the Pod, clients using rdflib.js are unable to understand it. For example, here's what a message in the SolidOS chat looks like with unicode escape:

:fd0071f5-01f9-416d-aa01-24eb6666d618
    n:content "Emoji3 \\U0001f60a";

Causes: image

:fd0071f5-01f9-416d-aa01-24eb6666d618
    n:content "Emoji3 \U0001f60a";

Causes: image

But,

:fd0071f5-01f9-416d-aa01-24eb6666d618
    n:content "Emoji3 \ud83d\ude0a";

Causes: image

So, even if I were to build functionality into my app to parse unicode, it wouldn't be interoperable with the apps that do not.

created time in a day

fork melvincarvalho/exoframe

Exoframe is a self-hosted tool that allows simple one-command deployments using Docker

fork in a day

startedtricksterproxy/trickster

started time in a day

startedmelvincarvalho/melvincarvalho.com

started time in 2 days

created repositorymelvincarvalho/melvincarvalho.com

homepage

created time in 2 days

startedv-byte-cpu/sx

started time in 2 days

startedpixie-labs/pixie

started time in 2 days

startedFUSAKLA/promruval

started time in 3 days

pull request commentlinkeddata/rdflib.js

fix several typos in store.ts

Thanks!

TallTed

comment created time in 3 days

push eventlinkeddata/rdflib.js

Ted Thibodeau Jr

commit sha 797b71b5a6ef4aaa208cc343186b56881a5573d8

fix several typos in store.ts human-facing comments

view details

Angelo Veltens

commit sha 555e473c3a83aff2634218187c5a19ea990fd23f

Merge pull request #493 from TallTed/patch-1 fix several typos in store.ts

view details

push time in 3 days

PR merged linkeddata/rdflib.js

fix several typos in store.ts

human-facing comments

+6 -6

0 comment

1 changed file

TallTed

pr closed time in 3 days

PR opened linkeddata/rdflib.js

fix several typos in store.ts

human-facing comments

+6 -6

0 comment

1 changed file

pr created time in 3 days

issue commentmhale/smtpd

How to gracefully shutdown smtpd?

I can give it a try, but it would need a thorough review for sure. My knowledge of Go is minimal.

ggilley

comment created time in 3 days

IssuesEvent

issue commentmhale/smtpd

How to gracefully shutdown smtpd?

Your analysis make sense. The Server in the http package has handling for the shutdown after the accept which is missing here. Want to have a go at fixing it and sending a pull request?

ggilley

comment created time in 3 days

issue openedmhale/smtpd

On shutdown, smtpd waits for one more message before shutting down

Hello, I'm looking at implementing a graceful shutdown but can't quite get it to work. Here's my code that starts the SMTP listener:

func listenEmail(ctx context.Context, port string) {
    srv := &smtpd.Server{
        Addr: "0.0.0.0:" + port,
        Handler: mailHandler,
        Appname: "...",
        Hostname: "...",
    }

    go func() {
        <- ctx.Done()

        log.Println("We should stop the SMTP server now...")
        srv.Close()
        log.Println("We closed it")
    }()

    err := srv.ListenAndServe()
    if err != nil {
        log.Fatal("Unable to start smtp server: ", err)
        os.Exit(1)
    }

    log.Println("listenEmail goroutine quits")
}

Not shown here, but on Ctrl+C, ctx gets cancelled, so the inner goroutine runs and calls srv.Close(). When I run this, the "We closed it" message from the inner goroutine gets printed, but the final "listenEmail goroutine quits" does not. I assume that's because ListenAndServe still keeps blocking.

I was looking at the smtpd source code:

// Serve creates a new SMTP session after a network connection is established.
func (srv *Server) Serve(ln net.Listener) error {
	if atomic.LoadInt32(&srv.inShutdown) != 0 {
		return ErrServerClosed
	}

	defer ln.Close()
	for {

		// if we are shutting down, don't accept new connections
		select {
		case <-srv.getShutdownChan():
			return ErrServerClosed
		default:
		}

		conn, err := ln.Accept()
		if err != nil {
			if netErr, ok := err.(net.Error); ok && netErr.Temporary() {
				continue
			}
			return err
		}

		session := srv.newSession(conn)
		atomic.AddInt32(&srv.openSessions, 1)
		go session.serve()
	}
}

To me it looks like it checks the shutdown condition at the start of the for loop, and then blocks at ln.Accept(). So, I'm guessing, it needs to receive one extra email for the loop to advance and the Serve call to return. Does that make sense? I'm a Go novice and am stepping on rakes and making wrong guesses left and right :-)

I also run a HTTP listener (http.Server) in a similar way, and it is able to finish up immediately, without waiting for one extra HTTP request. Perhaps there's a viable way to make smtpd work the same?

Originally posted by @cuu508 in https://github.com/mhale/smtpd/issues/27#issuecomment-823885342

created time in 3 days

startedfacebook/zstd

started time in 3 days

startedaristocratos/bpytop

started time in 4 days