Arkisto, tammikuu 2022

–config with auth login only works correctly with ”config” as filename

30. tammikuuta 2022 klo 16.24
Sijainti: Vianhallintajärjestelmät: Github
Avainsanat: Go, Mattermost

Issue

When a custom configuration file is supplied via --config to auth login, and reading credentials from the given file doesn’t succeed, an attempt is made to create the supplied directory path. This path is constructed by stripping a fixed ”config” (without a directory separator) from the user-supplied path.

When the custom configuration file doesn’t exist, this results in an unnecessary mkdir when the given filename ends with the hardcoded value of ”config” (case 1 below), or that plus a ”is a directory” failure when it doesn’t (case 2).

If the custom configuration file does exist, the useless mkdir is still triggered when the given filename ends with the hardcoded value of ”config” (case 3), or a ”not a directory” failure when it doesn’t (case 4).

Cause

The problematic mkdir call is issued here. I have no experience in Go, but instead of the TrimSuffix() call nested on that line, I think there should be a Go equivalent of a dirname instead, using the user-supplied path as parameter, and without referencing the value of configFileName (the source of the hardcoded ”config”).

Steps to reproduce

Case 1

A useless, empty mmctl_ directory gets created:

# rm -rf /tmp/mmctl_test/
# sudo -u mattermost mkdir /tmp/mmctl_test/
# /usr/bin/sudo -u mattermost /usr/local/bin/mmctl auth --quiet login https://example.com --name example --access-token 123456890abcdefghijklmnopq --config /tmp/mmctl_test/mmctl_config

  credentials for "example": "Personal Access Token@https://example.com" stored

# ls -lRa /tmp/mmctl_test/
/tmp/mmctl_test/:
yhteensä 24
drwxrwxr-x  3 mattermost mattermost  4096 tammi  30 15:27 .
drwxrwxrwt 23 root       root       12288 tammi  30 15:27 ..
drwx------  2 mattermost mattermost  4096 tammi  30 15:27 mmctl_
-rw-------  1 mattermost mattermost   244 tammi  30 15:27 mmctl_config

/tmp/mmctl_test/mmctl_:
yhteensä 8
drwx------ 2 mattermost mattermost 4096 tammi  30 15:27 .
drwxrwxr-x 3 mattermost mattermost 4096 tammi  30 15:27 ..

Case 2

Saving the credentials fails:

# rm -rf /tmp/mmctl_test/
# sudo -u mattermost mkdir /tmp/mmctl_test/
# /usr/bin/sudo -u mattermost /usr/local/bin/mmctl auth --quiet login https://example.com--name example --access-token 123456890abcdefghijklmnopq --config /tmp/mmctl_test/test
Error: cannot save the credentials: open /tmp/mmctl_test/test: is a directory
# ls -lRa /tmp/mmctl_test/
/tmp/mmctl_test/:
yhteensä 20
drwxrwxr-x  3 mattermost mattermost  4096 tammi  30 15:31 .
drwxrwxrwt 23 root       root       12288 tammi  30 15:31 ..
drwx------  2 mattermost mattermost  4096 tammi  30 15:31 test

/tmp/mmctl_test/test:
yhteensä 8
drwx------ 2 mattermost mattermost 4096 tammi  30 15:31 .
drwxrwxr-x 3 mattermost mattermost 4096 tammi  30 15:31 ..

Case 3

A useless, empty test_ directory is created:

# rm -rf /tmp/mmctl_test/
# sudo -u mattermost mkdir /tmp/mmctl_test/
# sudo -u mattermost touch /tmp/mmctl_test/test_config
# /usr/bin/sudo -u mattermost /usr/local/bin/mmctl auth login https://example.com --name example --access-token 123456890abcdefghijklmnopq --config /tmp/mmctl_test/test_config

  credentials for "example": "Personal Access Token@https://example.com" stored

# ls -lRa /tmp/mmctl_test/
/tmp/mmctl_test/:
yhteensä 24
drwxrwxr-x  3 mattermost mattermost  4096 tammi  30 15:58 .
drwxrwxrwt 22 root       root       12288 tammi  30 15:58 ..
drwx------  2 mattermost mattermost  4096 tammi  30 15:58 test_
-rw-rw-r--  1 mattermost mattermost   244 tammi  30 15:58 test_config

/tmp/mmctl_test/test_:
yhteensä 8
drwx------ 2 mattermost mattermost 4096 tammi  30 15:58 .
drwxrwxr-x 3 mattermost mattermost 4096 tammi  30 15:58 ..

Case 4

Saving the credentials again fails:

# rm -rf /tmp/mmctl_test/
# sudo -u mattermost mkdir /tmp/mmctl_test/
# sudo -u mattermost touch /tmp/mmctl_test/test
# /usr/bin/sudo -u mattermost /usr/local/bin/mmctl auth login https://example.com --name example --access-token 123456890abcdefghijklmnopq --config /tmp/mmctl_test/test
Error: mkdir /tmp/mmctl_test/test: not a directory
# ls -lRa /tmp/mmctl_test/
/tmp/mmctl_test/:
yhteensä 16
drwxrwxr-x  2 mattermost mattermost  4096 tammi  30 16:00 .
drwxrwxrwt 22 root       root       12288 tammi  30 16:00 ..
-rw-rw-r--  1 mattermost mattermost     0 tammi  30 16:00 test

Vastaa viestiin sen kontekstissa (Github)

–quiet not honored by auth login (possibly others)

30. tammikuuta 2022 klo 15.02
Sijainti: Vianhallintajärjestelmät: Github
Avainsanat: Mattermost

Steps to reproduce

  1. Log in using mmctl.

What I expect to happen

# /usr/bin/sudo -u mattermost /usr/local/bin/mmctl --quiet auth login https://example.com --name example --access-token 123456890abcdefghijklmnopq
# 

What happens instead

# /usr/bin/sudo -u mattermost /usr/local/bin/mmctl --quiet auth login https://example.com --name example --access-token 123456890abcdefghijklmnopq

  credentials for "example": "Personal Access Token@https://example.com" stored

# 

Potential cause

From looking at the code, output and --quiet are implemented in Printer, but auth and a few other places appear to use fmt.Printf() directly instead.

Vastaa viestiin sen kontekstissa (Github)

JSON files attached to a card (with .json filename extension) are empty when downloaded

28. tammikuuta 2022 klo 14.01
Sijainti: Vianhallintajärjestelmät: Github
Avainsanat: Apache, Brave, Firefox, Snap, Ubuntu, Wekan, Wikipedia

Issue

JSON files can be added to cards as attachments, but they are empty when downloaded from a card.

Server Setup Information

  • Did you test in newest Wekan?: 5.90
  • Did you configure root-url correctly so Wekan cards open correctly? yes
  • Operating System: Ubuntu 20.04
  • Deployment Method: snap
  • Http frontend if any: Apache
  • What webbrowser version are you using? Firefox (reproducible in Brave too)

Problem description

Reproduction Steps

  1. Have a JSON file, such as the example from Wikipedia. Name it example.json.
  2. Open a card in Wekan.
  3. Select + from the Attachments section.
  4. Select ”Computer” from the popup.
  5. Select example.json.
  6. With the JSON file now attached to the card, select to ”Download” it.
  7. Open the downloaded JSON file.

What I expect to happen

For the downloaded file contents to match the uploaded file.

What happens instead

The file is empty.

Logs

Nothing in either the browser console nor snap logs when the issue is triggered.

Other info

  • Deleting the attachment seems to work.
  • The issue can be worked around by renaming the JSON file prior to uploading to have a .txt extension instead of (or in addition to) .json.

Vastaa viestiin sen kontekstissa (Github)

Also: #19974

16. tammikuuta 2022 klo 20.03
Sijainti: Vianhallintajärjestelmät: Nextcloud

Also: #19974

Vastaa viestiin sen kontekstissa (Nextcloud)

I think my HA is also affected by this

16. tammikuuta 2022 klo 14.45
Sijainti: Vianhallintajärjestelmät: Github
Avainsanat: Home Assistant, Kodi

I think my HA is also affected by this. I haven’t done any firewall snooping and I’m not using pFsense, but I also have a timer based on Kodi’s ”turn_off” event, and the symptom of repeated ”turn_off” events match. The workaround from @ChopperRob above also seems to work.

(Probably unrelated, but I’ve also noticed that my ”turn display on when Kodi becomes idle” stops working when my LAN/WLAN gets very congested (such as when doing backups over the network). I’m using ”idle” because the log never shows a ”turn_on” event from Kodi; just ”idle”, ”playing” and the intermittently incessant ”turn_off” events.)

Vastaa viestiin sen kontekstissa (Github)

I assume you’ve tried basic elimination

13. tammikuuta 2022 klo 13.23
Sijainti: Blogit: Wandering Thoughts
Avainsanat: Jeff Atwood

I assume you’ve tried basic elimination, by testing with different parts & peripherals removed?

It’s a hassle of course, especially after you’ve already settled in to using the system, not to mention how tedious it is to run memtest for days on end just to achieve sufficient confidence that you’ve proved a negative.

I’m not as hardcore about this as Jeff Atwood, but I’ve learned not to discount anything as potentially being the cause or at least a trigger for all kinds of issues. Besides obvious things like RAM modules, OTOH I’ve had at least one internal memory card reader, one USB bluetooth dongle and one (SATA) SSD turn out to be the troublemaker; usually something much easier to replace than motherboard+almost everything. (And unfortunately it’s usually been easier to just replace or just get rid of the triggering component rather than hope for a software fix, even if the issue ultimately was with software.)

The cold lockups or the case being touch-sensitive don’t sound like one of those easily solvable ones, but since there’s a plethora of symptoms, perhaps some still might be, and are just hard to see from the mix.

Vastaa viestiin sen kontekstissa (Wandering Thoughts)

This also seems to be fixed in VLC 3.0.9.2-1

2. tammikuuta 2022 klo 20.09
Sijainti: Vianhallintajärjestelmät: Launchpad
Avainsanat: VLC

Seems to be fixed in VLC 3.0.9.2-1 (Ubuntu 20.04); at least I haven’t been able to reproduce it anymore.

Vastaa viestiin sen kontekstissa (Launchpad)

Reproducible here

2. tammikuuta 2022 klo 20.04
Sijainti: Vianhallintajärjestelmät: Launchpad
Avainsanat: VLC

Same ”double free or corruption (!prev)” reproducible here too (VLC 3.0.9.2-1, Ubuntu 20.04), even more easily: the position doesn’t matter, and the first attempt to screenshot is already enough to trigger the issue.

I came across this when trying to screenshot a Superman cartoon I downloaded from Internet Archive [1].

* [1] https://archive.org/download/dom-6746superman-episode7-theundergroundworld512kb/dom-6746superman-episode7-theundergroundworld512kb.mp4

Vastaa viestiin sen kontekstissa (Launchpad)

Katuvalo valaisee männynoksaa

1. tammikuuta 2022 klo 19.59
Sijainti: Muut: Oulun Palautepalvelu

Männyn oksa kadun toiselta puolelta kasvanut niin pitkäksi, että tämä katuvalo valaisee lähinnä sen oksan kärkeä.

Katuvalo, jonka valokeila osuu kadun toiselta puolelta kurottuvaan männynoksaan

Vastaa viestiin sen kontekstissa (Oulun Palautepalvelu)