Scroll to adjust with touchpad

Describe the bug
Scrolling on the slider with 2 fingers does not adjust the volume, unlike the slider in the macOS control centre, for example.
To Reproduce
Steps to reproduce the behavior:
Scroll on the slider with 2 fingers on a MacBook touchpad.
Expected behavior
Value would adjust. Scrolling towards the left on a horizontal slider should decrease the value, and vice versa.
Screenshots
If applicable, add screenshots to help explain your problem.
Platform and version:

OS: [e.g. iOS, macOS] macOS
Device: [e.g. iPhone SE] m3 pro MacBook

Additional context
Add any other context about the problem here.

Added to v.1.2.1


Repeated Crashes in Prod due to being within a read only filesyste

Thanks in advance for your bug report!

[X] Have you reproduced this issue in incognito/private browsing?
[X] Have you made sure you issue doesn't already exist?

Where is the URL that this occurs?
https://web.pulsar-edit.dev/**
What's your issue?
The frontend is hosted in an environment with a read only filesystem.
What this means is that in our startup scripts we specify to run a tailwind script that attempts to write a file. This repeatedly fails to save the file on exit causing it to crash after each web request. Unsure of how it's serving the compiled CSS anyway, but likely this script should be moved to a postinstall stage, or a manual build script.
The dev portion of scripts can be left as is for improved developer experience, but prod can't run these scripts.
Additionally something else that will be solved by this, using tailwind in the frontend seems to take just enough ram (or some other newer process) that we are failing to deliver social media cards about 90% of the time. Since already we were very close to our memory limit during this process and would fail about 50% of the time.
I'm hoping solving the tailwind in prod can resolve this issue but time will tell.
@kyjus25 If you'd like to take a look, otherwise I will as soon as I can
Which OS/Browser/Version does this happen on?
N/A
Steps to Reproduce/Additional Details:
N/A

Unsure of how it's serving the compiled CSS anyway

It takes the source /src/site.css file and builds it to ./public/site.css which is what the HTML loads in.

likely this script should be moved to a postinstall stage

Done in #29. I hope that fixes it! Worse case scenario we can unignore the ./public/site.css file and commit it to git so prod doesn't have to do building it all, but it should work as postinstall since it does some puppeteer stuff already.

Yeah great point on adding it to postInstall. I'll try to test this today, so otherwise we can unignore it


error in multiple batch strategies

I think the batch_queries_uncertainty function needs an exception when there is not enough objects to build many batches.
I am getting the following error, when I try to generate 3 batches in the multiple_batch_selection branch:
Metrics names:  ['accuracy', 'efficiency', 'purity', 'fom']
Metrics values:  [0.6913191076624636, 0.44495980210265923, 0.6570776255707762, 0.17342826522907007]
Traceback (most recent call last):
File "run_AL.py", line 63, in
output_fname=output_fname, num_batches=num_batches)
File "/media/emille/git/COIN/RESSPECT_repo/venv/resspect_main/lib/python3.7/site-packages/resspect-0.1-py3.7.egg/resspect/time_domain_loop.py", line 314, in time_domain_loop
File "/media/emille/git/COIN/RESSPECT_repo/venv/resspect_main/lib/python3.7/site-packages/resspect-0.1-py3.7.egg/resspect/database.py", line 1190, in make_query_budget
File "/media/emille/git/COIN/RESSPECT_repo/venv/resspect_main/lib/python3.7/site-packages/resspect-0.1-py3.7.egg/resspect/query_budget_strategies.py", line 97, in batch_queries_uncertainty
File "/media/emille/git/COIN/RESSPECT_repo/venv/resspect_main/lib/python3.7/site-packages/scipy/special/_logsumexp.py", line 215, in softmax
return np.exp(x - logsumexp(x, axis=axis, keepdims=True))
File "/media/emille/git/COIN/RESSPECT_repo/venv/resspect_main/lib/python3.7/site-packages/scipy/special/_logsumexp.py", line 101, in logsumexp
a_max = np.amax(a, axis=axis, keepdims=True)
File "<array_function internals>", line 6, in amax
File "/media/emille/git/COIN/RESSPECT_repo/venv/resspect_main/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2668, in amax
keepdims=keepdims, initial=initial, where=where)
File "/media/emille/git/COIN/RESSPECT_repo/venv/resspect_main/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 90, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation maximum which has no identity

actually this error occur even when I use num_batches=1. Maybe it is something else.


No CIFAR10 code for Chap 4?

Could you please upload the code for CIFAR10 outlined in Chapter 4?
Is there other missing code?  I am reading through the book, and having the code on Git is really helpful.

Done.
I believe this is the last remaining code, but please let me know if you find anything else is missing!


MSBuild

Is it possible to integrate this tool with MSBuild only? We do not have VS installed on build server (Jenkins). So the question is what can we do?

Wax is just an interactive editor to maintain your wix source files.
What you need to install on the build server is the WiX Toolset (http://wixtoolset.org/)

@watsug
use
 %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsMSBuildCmd.bat""
and
msbuild.exe   %1   /t:Rebuild   /p:Configuration=Release;Platform="x86"
you can add task to  Jenkins !

@watsug    WiX  will WiX project will be compiled ！
Wax just a editor !


SOP detachedSign() memory usage

Describe the bug
Thank you for creating this library. It's a pleasure to use.
My problem is that I'm running out of memory when signing big files (multiple gigabytes) with SOP. Am I doing something wrong here?
        SOP sop = new SOPImpl();
        ReadyWithResult<SigningResult> readyWithResult = sop.detachedSign()
                .key(key.getBytes(StandardCharsets.UTF_8))
                .data(new FileInputStream("bigfile.csv"));

Version

pgpainless-core: 1.6.6
pgpainless-sop: 1.6.6

To Reproduce

Use sop.detachedSign() with a big file and watch process memory usage.
        SOP sop = new SOPImpl();
        ReadyWithResult<SigningResult> readyWithResult = sop.detachedSign()
                .key(key.getBytes(StandardCharsets.UTF_8))
                .data(new FileInputStream("bigfile.csv"));

Expected behavior

SOP detachedSign() should be able to handle big files without running out of memory
Additional context

As far as I can tell, the problem is that the entire file is buffered into a ByteArrayOutputStream in DetachedSignImpl https://github.com/pgpainless/pgpainless/blob/main/pgpainless-sop/src/main/java/org/pgpainless/sop/DetachedSignImpl.java#L101.
Would it be possible to allow customization of this output stream? Using e.g. FileOutputStream or OutputStream.nullOutputStream() instead of ByteArrayOutputStream would fix the issue.
If this sounds like a reasonable feature, I might be able to create a PR.
        ReadyWithResult<SigningResult> readyWithResult = sop.detachedSign()
                .key(key.getBytes(StandardCharsets.UTF_8))
                .withOutputStream(myOutputStream) // <- either a new method
                .data(myData, myOutputStream);    // <- or a new parameter to data()

Hey!
Thanks for the bug report!
The buffer was actually not needed at all here.
I fixed the OOM by replacing the buffer with a sink that simply discards the data after passing through the signer stream.
It is not necessary to be able to pass in a custom output stream in this case, since the result of the detached-sign operation are simply the detached signatures.
Could you build PGPainless from https://github.com/pgpainless/pgpainless/tree/fixSopOOM and see, if the issue is gone with that patch?
It should be enough to clone the repo, check out the fixSopOOM branch, call ./gradlew publishToMavenLocal and then bump your pgpainless-sop dependency to 1.6.7-SNAPSHOT.

Thanks for the quick response. That version works perfectly. :+1:

Great, I'll prepare a new release :)

This is fixed with PGPainless 1.6.7

Awesome, thank you! :+1:


Renaming States

Renaming a State does not Update the GUI.
Makes it impossible to create a transition towards a state, that was renamed but not updated in GUI.

Moving a state triggers redraw and shows the new name.


Like canvas functionality

Add an option to (un)like canvas. It should be possible to do that once a canvas is finished.

Won't do. Too much gas used when publishing a contract.


kics-scan line in YAML must be at start of file

When scanning the following code, the line should be ignored:
  after_script:
    - >
      # kics-scan ignore-line
      if [ "$CI_SAST_TOKEN" == '' ];
      then
        echo "Please create a CI_SAST_TOKEN with API access here ${CI_PROJECT_URL}/-/settings/access_tokens"
        echo "And put the CI_SAST_TOKEN into the CI/CD variables ${CI_PROJECT_URL}/-/settings/ci_cd"
      fi

However the comment does not get recognized. I instead have to do:
  after_script:
    -
# kics-scan ignore-line
      if [ "$CI_SAST_TOKEN" == '' ];
      then
        echo "Please create a CI_SAST_TOKEN with API access here ${CI_PROJECT_URL}/-/settings/access_tokens"
        echo "And put the CI_SAST_TOKEN into the CI/CD variables ${CI_PROJECT_URL}/-/settings/ci_cd"
      fi

My linter says that this code is not nice. :)
Expected Behavior
The line should be ignored.
Preparing Scan Assets: Done
Executing queries: [---------------------------------------------------] 100.00%

Files scanned: 1
Parsed files: 0
Queries loaded: 0
Queries failed to execute: 0

------------------------------------

Results Summary:
HIGH: 0
MEDIUM: 0
LOW: 0
INFO: 0
TOTAL: 0

Actual Behavior
The line isn't ignored.
Scanning with Keeping Infrastructure as Code Secure snapshot-933d0e6d

Preparing Scan Assets: Done
Executing queries: [---------------------------------------------------] 100.00%

Files scanned: 1
Parsed files: 1
Queries loaded: 0
Queries failed to execute: 0

------------------------------------

Passwords And Secrets - Generic Token, Severity: HIGH, Results: 1
Description: Query to find passwords and secrets in infrastructure code.
Platform: Common

        [1]: license_check.yml:4

                003:       # kics-scan ignore-line
                004:       if [ "$CI_SAST_TOKEN" =<SECRET-MASKED-ON-PURPOSE>
                005:       then

Results Summary:
HIGH: 1
MEDIUM: 0
LOW: 0
INFO: 0
TOTAL: 1

I tried fiddling with the regexp in pkg/model/model.go but couldn't get it to work.

Hi @rndmh3ro,
I have looked into this issue and noticed that with the first format, the comment appears to be treated like content and not a comment due to the use of >.
The sample using this format works for the kics-ignore
after_script:
  - # kics-scan ignore-line
    if [ "$CI_SAST_TOKEN" == '' ];
    then
      echo "Please create a CI_SAST_TOKEN with API access here ${CI_PROJECT_URL}/-/settings/access_tokens"
      echo "And put the CI_SAST_TOKEN into the CI/CD variables
    ${CI_PROJECT_URL}/-/settings/ci_cd" fi

Let us know what you think.

Thanks, that makes sense!
For me changing the script is fine.


Transaction is not getting rolled back

Please first make sure you have looked at:

Documentation: https://github.com/mkleehammer/pyodbc/wiki
Other issues

Environment
To diagnose, we usually need to know the following, including version numbers.  On Windows, be
sure to specify 32-bit Python or 64-bit:

Python: 3.9.18(64 bit)
pyodbc: 5.1.0
OS: Windows
DB: MSSQL
driver: ODBC Driver 17 for SQL Server

Issue: observed behavior
``
import pyodbc
import pandas as pd
from pyodbc import apilevel
class DBConnection:
def init(self):
self.conn = None
self.error_occurred = False
def __enter__(self):
    try:
        # Initialize the connection
        self.conn = pyodbc.connect()
        # Begin transaction
        self.conn.autocommit = False
        self.error_occurred = False
        return self
    except Exception as e:
        print(f"Error occurred while establishing connection: {e}")
        raise

def __exit__(self, exc_type, exc_value, traceback):
    try:
        if self.conn:
            if exc_type is not None or self.error_occurred:
                # Rollback transaction if exception occurred
                print(f"exception received here--->{exc_type}")
                self.conn.rollback()
                self.error_occurred = False
            else:
                print("Coming for commit--->")
                # Commit transaction if no exception occurred
                self.conn.commit()
            # Reset autocommit to default value
            self.conn.close()
    except Exception as e:
        print(f"Error occurred while closing connection: {e}")

def select_data(self, query):
    try:
        with self.conn.cursor() as cursor:
            cursor.execute(query)
            rows = cursor.fetchall()
            if rows:
                columns = [str(column[0]) for column in cursor.description]
                df = pd.DataFrame.from_records(rows, columns=columns)
                return df
            else:
                return pd.DataFrame()
    except Exception as e:
        print(f"Error occurred while executing select query: {e}")
        raise

def bulk_update(self, table, updates):
    try:
        with self.conn.cursor() as cursor:
            for update in updates:
                update_query = f"UPDATE {table} SET {', '.join([f'{col} = ?' for col in update['columns']])} WHERE {update['condition']}"
                cursor.execute(update_query, update['values'])
    except Exception as e:
        print(f"Error occurred while bulk updating data: {e}")
        self.error_occurred = True
        raise

def single_insert(self, table, data):
    """
    Perform a single insert operation for a row of data into the specified table.

    Args:
        table (str): The name of the table where the data will be inserted.
        data (dict): A dictionary representing the data to be inserted.
                     The keys should correspond to column names and values
                     should correspond to the values to be inserted.

    Raises:
        Exception: If an error occurs during the insert operation.
    """
    try:
        with self.conn.cursor() as cursor:
            columns = ', '.join(data.keys())
            placeholders = ', '.join(['?' for _ in data.values()])
            insert_query = f"INSERT INTO {table} ({columns}) VALUES ({placeholders})"
            cursor.execute(insert_query, list(data.values()))
    except Exception as e:
        print(f"Error occurred while performing single insert: {e}")
        self.error_occurred = True
        raise

def bulk_insert(self, table, df):
    try:
        with self.conn.cursor() as cursor:
            # Extract column names and values from the DataFrame
            columns = list(df.columns)
            values = df.values.tolist()
            # Generate the INSERT INTO query
            insert_query = f"INSERT INTO {table} ({', '.join(columns)}) VALUES ({', '.join(['?'] * len(columns))})"
            # Execute the query
            cursor.executemany(insert_query, values)
    except Exception as e:
        print(f"Error occurred while bulk inserting data: {e}")
        self.error_occurred = True
        raise

df = pd.DataFrame({
'mlc_component': ['1_bj'],
'mlc_section': ['1_bj'],
'mlc_key': ['1_bj'],
'mlc_value': ['1_bj']
})
data_to_insert = {
'mlc_component': '3_bj',
'mlc_section': '3_bj',
'mlc_key': '3_bj',
'mlc_value': '3_bj'
}
data1_to_insert = {
'mlc_component': '2_bj',
'mlc_section': '2_bj',
'mlc_key': '2_bj',
'mlc_value': '2_bj'
}
with DBConnection() as db_conn:
try:
# db_conn.bulk_insert("guess.data_configuration", df)
print("apilevel here--->", apilevel)
cursor = db_conn.conn.cursor()
cursor.execute("BEGIN TRANSACTION")  # Start transaction
db_conn.bulk_insert('guess.data_configuration', df)
db_conn.single_insert('guess.data_configuration', data_to_insert)
db_conn.single_insert('guess.data_configuration', data_to_insert)
cursor.execute("COMMIT TRANSACTION")  # Commit if both inserts succeed
# db_conn.bulk_insert("data_configuration", df)
except Exception as e:
db_conn.error_occurred = True
cursor.execute("ROLLBACK TRANSACTION")  # Rollback on any exception
raise e
``
Here table in which data is getting inserted has primary key and in consecutive single insert I am inserting the same data which raises unique constraint violation error. So here expected behavior is to rollback the previous transactions but that is not observed. Table has 2 entries with the data mentioned in df and data_to_insert.
To resolve this I have passed same cursor to all the methods defined the class and output is as per my expectations i.e. data is getting rollback for above use case.
which raises following questions:

For same connections if the cursor is different then the transaction management will also be different?
How the connection management and transaction management takes place is it connection object is taking care of connection management and cursor is taking care of transaction management?
What is the ideal way to handle above situation?

1.Are you connecting with autocommit on or off?
2.Post an ODBC trace.

1.Are you connecting with autocommit on or off? - Auto commit is off
2.Post an ODBC trace.
ODBC_Trace.LOG

@SumitDangat , there's a pyodbc wiki article that might be helpful here:
https://github.com/mkleehammer/pyodbc/wiki/Database-Transaction-Management
In short, you probably shouldn't be executing "COMMIT TRANSACTION" SQL commands (use conn.commit() instead), and if you want two concurrent database transactions, you'll have to open up two connections to the database.  Hope that helps.

@keitherskine : Thanks for the prompt response.
In above use case what I am trying is:
BEGIN TRANSACTION
INSERT INTO TABLE VALUES ...
UPDATE TABLE SET ...
COMMIT TRANSACTION
In above code only one connection is created and within that multiple cursors are opened which you can see in bulk_insert() and single insert. as per the above reference link it should be rolled back when within one connection if any of the execute statement fails as per the code which is not happening.
Help me with possible code changes in above code which can get me the expected results if possible :)

I think I see where the issue is, @SumitDangat .  It's the use of pyodbc context managers (with self.conn...).  It's not obvious, but pyodbc cursor context managers include an implicit commit.  This is described in the wiki here:
https://github.com/mkleehammer/pyodbc/wiki/Cursor#context-manager
So, instead of using with self.conn.cursor() as cursor:, I would either use just cursor = self.conn.cursor() or the context.closing utility, as described in the wiki:
from contextlib import closing

with closing(self.conn.cursor()) as cursor:
    ...

Thanks @keitherskine for providing valuable inputs. Given solution is working as per the expectations.


Prevent job failures

What does this PR do?
2 small fixes (with 2 different commits):

prevent failures in junit upload when empty fast tests (adapt condition to new naming with v2)
Extend aws-ssm retry duration from 63s to 2047s (~34min) total

Motivation
Preven failures in CI

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

LGTM but isn't 30+ minutes a bit too long?

it's in case of issue and the maximum time. As it's exponential there a chance to be solved meanwhile. Better late than never I think. If it's too much we will have possibility to decrease

/merge


React jsx icon

Now that React.js is taking over the JS world it's time to get a dedicated icon for it!

Please, add coffeescript react icon for *.cjsx files too!)

@jonywtf done -> d689323ab5fbb27b6395a03a4f995baed2881840
@bittersweetryan We'll just have to wait until someone adds it to an icon font

Just merged #124 which has a jsx icon by @roman01la


RemoteFX dates of statements in the article

Would be nice to have some dates added to the statements and updates that are in this article, I know they are very old so would be nice to see some dates in there to help anyone else coming along and reading this information.
[Enter feedback here]

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 341357d9-570c-043d-489b-74701a61c55c
Version Independent ID: dc864602-6186-c5d7-f5b8-852aec46fb58
Content: Explaining Microsoft RemoteFX
Content Source: virtualization/community/team-blog/2010/20100317-explaining-microsoft-remotefx.md
Product: windows-server-2008
GitHub Login: @mattbriggs
Microsoft Alias: mabrigg

We hugely appreciate your contribution, feedback, and support to our technical documentation.
We’ve phased out GitHub Issues on this repository as the feedback mechanism for content and have replaced it with a new feedback system. For more information see, Content User Feedback. As part of this rollout, we are migrating your issue where our team will use your comments to improve the documentation experience. Unfortunately, this does mean you won't be able to access this issue after the migration is complete.
All issues will be migrated by Thursday 29th August 2024.
Once again, thank you for your valuable feedback, we hope you’ll continue to contribute using our new feedback system.


squoosh-cli: use buildNpmPackage

Description of changes
See https://github.com/NixOS/nixpkgs/issues/229475

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

cc @kidonng who originally packaged it in https://github.com/NixOS/nixpkgs/pull/135017

Result of nixpkgs-review pr 249793 run on x86_64-linux 1

1 package built:

squoosh-cli

It builds fine, but fails to run as reported in this issue https://github.com/GoogleChromeLabs/squoosh/issues/1033:
$ squoosh-cli 0dj3re84aac51.png
node:internal/deps/undici/undici:11576
    Error.captureStackTrace(err, this);
          ^

TypeError: Failed to parse URL from /nix/store/32nf11s4z82q0bzpdv34gxh579fqr4i7-squoosh-cli-0.7.3/lib/node_modules/<EMAIL_ADDRESS>    at Object.fetch (node:internal/deps/undici/undici:11576:11) {
  [cause]: TypeError [ERR_INVALID_URL]: Invalid URL
      at new NodeError (node:internal/errors:405:5)
      at new URL (node:internal/url:611:13)
      at new Request (node:internal/deps/undici/undici:7132:25)
      at fetch2 (node:internal/deps/undici/undici:10715:25)
      at Object.fetch (node:internal/deps/undici/undici:11574:18)
      at fetch (node:internal/process/pre_execution:229:25)
      at instantiateAsync (/nix/store/32nf11s4z82q0bzpdv34gxh579fqr4i7-squoosh-cli-0.7.3/lib/node_modules/@squoosh/cli/node_modules/@squoosh/lib/build/index.js:28:11469)
      at createWasm (/nix/store/32nf11s4z82q0bzpdv34gxh579fqr4i7-squoosh-cli-0.7.3/lib/node_modules/@squoosh/cli/node_modules/@squoosh/lib/build/index.js:28:12079)
      at /nix/store/32nf11s4z82q0bzpdv34gxh579fqr4i7-squoosh-cli-0.7.3/lib/node_modules/@squoosh/cli/node_modules/@squoosh/lib/build/index.js:28:35216
      at instantiateEmscriptenWasm (/nix/store/32nf11s4z82q0bzpdv34gxh579fqr4i7-squoosh-cli-0.7.3/lib/node_modules/@squoosh/cli/node_modules/@squoosh/lib/build/index.js:1:466) {
    input: '/nix/store/32nf11s4z82q0bzpdv34gxh579fqr4i7-squoosh-cli-0.7.3/lib/node_modules/<EMAIL_ADDRESS>    code: 'ERR_INVALID_URL'
  }
}

Node.js v18.17.1

Comments suggest this is not getting fixed any time soon, maybe this package should be marked as broken?


refactor: generate curve-specific function names with macro

For exposed functions that are curve-specific, the expected symbol is based on the curve name.
For example MSMCuda becomes bn254MSMCuda for CURVE=bn254.
currently it is implemented via objcopy by redefining symbols after compilation.
This PR modifies the function names at preprocessing time instead.
For shared objects, objcopy doesn't work (since it cannot modify the dynsym section).

perhaps needs recreation after recent rebase of dev by @jeremyfelder


Trust Management: DIF Trust Establishment

Link: https://identity.foundation/trust-establishment/spec/v1/

Do we know any profile that is using it right now?


XOAuth Error (same as #524)

Original issue #524 from Pseudomous:
Hello, this was working great but suddenly got the XOAuth error. IMAP is enabled. While I do have 2-step verification enabled, the program worked fine with it before. Please help. Have deleted and reinstalled but same error... many thanks.
i have a oneplus one phone.

I have a Samsung Galaxy S4
I'm having the same problem as pseudomous above.   I have 2-step verification, SMS Backup+ worked until Dec 14, then stopped working.   Have not been able to get this working since.
Get "XOAuth authorization error.  Please make sure you enabled IMAP in your Gmail account settings"
IMAP is and has been enabled.
Here is the Log:
03-08 20:08 Backup requested (manual)
03-08 20:08 Starting backup (MANUAL)
03-08 20:08 Backing up (916 SMS, 0 MMS, 163 call log)
03-08 20:08 Using config: BackupConfig{imap=BackupImapStore{uri=imap+ssl+://XOAUTH2:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@imap.gmail.com:993}, skip=false, currentTry=0, maxItemsPerSync=-1, groupToBackup=ContactGroup{_id=-1, type=EVERYBODY}, backupType=MANUAL, debug=true, typesToBackup=[SMS, MMS, CALLLOG, WHATSAPP]}
03-08 20:08 need to perform xoauth2 token refresh
03-08 20:08 error refreshing token: com.zegoggles.smssync.auth.TokenRefreshException: android.accounts.AuthenticatorException: User intervention required. Notification has been pushed., cause=android.accounts.AuthenticatorException: User intervention required. Notification has been pushed.
03-08 20:08 Authentication error: Command: sensitive; response: #2# [NO, [ALERT], Invalid credentials (Failure)] (exception: com.fsck.k9.mail.store.XOAuth2AuthenticationFailedException: Command: sensitive; response: #2# [NO, [ALERT], Invalid credentials (Failure)])
03-08 20:08 BackupState{currentSyncedItems=0, itemsToSync=0, backupType=MANUAL, exception=com.fsck.k9.mail.store.XOAuth2AuthenticationFailedException: Command: sensitive; response: #2# [NO, [ALERT], Invalid credentials (Failure)], state =ERROR}
03-08 20:08 Backup finished
03-08 20:10 Backup requested (manual)
03-08 20:10 Starting backup (MANUAL)
03-08 20:10 Backing up (916 SMS, 0 MMS, 163 call log)
03-08 20:10 Using config: BackupConfig{imap=BackupImapStore{uri=imap+ssl+://XOAUTH2:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@imap.gmail.com:993}, skip=false, currentTry=0, maxItemsPerSync=-1, groupToBackup=ContactGroup{_id=-1, type=EVERYBODY}, backupType=MANUAL, debug=true, typesToBackup=[SMS, MMS, CALLLOG, WHATSAPP]}
03-08 20:10 need to perform xoauth2 token refresh
03-08 20:10 error refreshing token: com.zegoggles.smssync.auth.TokenRefreshException: android.accounts.AuthenticatorException: User intervention required. Notification has been pushed., cause=android.accounts.AuthenticatorException: User intervention required. Notification has been pushed.
03-08 20:10 Authentication error: Command: sensitive; response: #2# [NO, [ALERT], Invalid credentials (Failure)] (exception: com.fsck.k9.mail.store.XOAuth2AuthenticationFailedException: Command: sensitive; response: #2# [NO, [ALERT], Invalid credentials (Failure)])
03-08 20:10 BackupState{currentSyncedItems=0, itemsToSync=0, backupType=MANUAL, exception=com.fsck.k9.mail.store.XOAuth2AuthenticationFailedException: Command: sensitive; response: #2# [NO, [ALERT], Invalid credentials (Failure)], state =ERROR}
03-08 20:10 Backup finished

I did try a disconnect and reconnect.   The reconnect failed with a similar error.

thanks for the detailed report. the log says User intervention required. Notification has been pushed. Looks like some manual user intervention is required to refresh the token.

did you get a system notification when the error happened? it should be a password prompt or similar.

No, I was waiting for something, and looked for it, but there was no
indication anywhere that login was waiting.
Other programs using authorization might forward you to the browser to
"finish" logging in, some use the one-time tokens (which require password
entry), and most of them now just have a screen come up that says what
information is being shared, permissions, etc, and to accept.
--eric powell

eric powell
po box 129, orangeburg, sc 29116-0129
803-997-0707 - fax<PHONE_NUMBER>
<EMAIL_ADDRESS>On Mon, Mar 9, 2015 at 8:33 AM, Jan Berkel<EMAIL_ADDRESS>wrote:

did you get a system notification when the error happened? it should be a
password prompt or similar.
—
Reply to this email directly or view it on GitHub
https://github.com/jberkel/sms-backup-plus/issues/539#issuecomment-77845031
.

Ok, that's weird. Android should handle this case (as it says in the log: Notification has been pushed.) I'll see if I can reproduce it.

Jan,
Something was bugging me about having seen something about Google and
XOAuth changing recently, and when I got some time I searched for it and
found some tweets by searching for "Google Authentication API".   They
indicated that there was a problem with an error similar to what I was
experiencing that caused odd authentication problems over a variety of apps.
After reading that, I tried the SMS Backup+ authentication again, and it
worked fine now.   It appears it was a Google problem and temporary.
I'm sorry that you were chasing a problem that turned out to be Google's
problem.  Thanks for responding to my inquiry so quickly.
Everything seems to work fine now.
Cheers,
--eric powell
On Mon, Mar 9, 2015 at 10:18 AM Jan Berkel<EMAIL_ADDRESS>wrote:

Ok, that's weird. Android should handle this case (as it says in the log:
Notification has been pushed.) I'll see if I can reproduce it.
—
Reply to this email directly or view it on GitHub
https://github.com/jberkel/sms-backup-plus/issues/539#issuecomment-77861238
.

Something was bugging me about having seen something about Google and XOAuth changing recently, and when I got some time I searched for it and found some tweets by searching for "Google Authentication API".   They indicated that there was a problem with an error similar to what I was experiencing that caused odd authentication problems over a variety of apps.
After reading that, I tried the SMS Backup+ authentication again, and it worked fine now.   It appears it was a Google problem and temporary.

cool, thanks for the research!

After you searched for "Google Authentication API", what did you do to make it work? I got the same issue.  Thanks.


⚠ Spryr has degraded performance

In 713f7b7, Spryr (https://spryr.com) experienced degraded performance:

HTTP code: 200
Response time: 3070 ms

Resolved: Spryr performance has improved in 70398fb after 11 minutes.


statusline is reset when vimrc is reloaded with syntastic recommended settings

My .vimrc has the recommended settings.
I also have vim-airline installed
However, when .vimrc is reloaded, my statusline gets reset and airline is removed.
There is also an issue opened on vim-airline`.

Please read :h syntastic-statusline-flag, in particular the last paragraph.  In this particular case, airlineshould support syntastic's status line flag out of the box, provided that you leave alonestatusline`.

@go2null : Not sure if you've found a solution but this is how I fixed this.
map <leader>vr :source ~/.vimrc<CR> :AirlineRefresh <CR>

Hope this helps!

@hungle88 There wouldn't be anything to fix if you left alone statusline.

@lcd047 Unfortunately, that not seems to be the case. I tried to comment out all the statusline settings and keep only the recommended settings as follow
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

but when I sourced the ~/.vimrc file, the statusline would just blacked out, like @go2null mentioned above:

However, when .vimrc is reloaded, my statusline gets reset and airline is removed.
There is also an issue opened on vim-airline`.

@hungle88 The recommended settings don't apply if you're using other plugins that change the status line.  This is explicitly stated in the manual: :h syntastic-statusline-flag.  Just delete these lines from your vimrc:
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

@lcd047  airline maintainer here: What would you suggest, to have a better support for airline?

@chrisbra Perhaps add a note to the manual that the recommendation to set statusline for syntastic doesn't apply.  There is nothing else to improve, airline works fine with syntastic out of the box.

@lcd047 thanks and done.

Sorry the necro,
Deleting those recommend commands helps but in my case was not their fault but reloading vimrc from inside itself that turn off airline!


Do not package for Node version 12 and 14

To be reviewed whether we want to go back and add support again, current state it seems they are not functional, see CI for https://github.com/duckdb/duckdb-node/actions/runs/8169684579.

Same, this mostly remove / simplify things, it should be OK to merge this.


Explicitly require active_support/core_ext/array/conversions

Grape is not explicitly loading the activesupport parts that are required for Array#to_xml. Because of this the Array serialization to XML breaks when activesupport 6.1 is taken into use.
The commit that deletes what previously was requiring the parts that Grape relies on is this https://github.com/rails/rails/commit/12959dee0f19a8e050dd1236b031c2c690729905#diff-f805b1a36e26831e5eee78fb55549de44fb842f78443b178d5d5438105152017

👍


Vector table must be 256 aligned

The vector table must be 256 aligned to work reliably, it must have been working by accident up to now.  This modification tested on a u-blox c027 board.  Without the change the value of SCB->VTOR and the location of int_table just before the call to test_once() in the second part of the test are as follows:
SCB->VTOR 0x10000280, int_table 0x100002a0
...and obviously the test fails.  With the change they are as follows:
SCB->VTOR 0x10000400, int_table 0x10000400
...and the test passes.
See issue:
https://github.com/mbedmicro/mbed/issues/993

The code uses InterruptIn, which calls:
NVIC_SetVector(EINT3_IRQn, (uint32_t)handle_interrupt_in);
Which in turns reallocated the vector table. This makes the whole test kinda pointless tbh.

Hi there.  Looking at the code for the CMSIS NVIC_SetVector() function on the LPC176X platform I think it only does the reallocation of the vector table if SCB->VTOR is below 0x10000000, which it isn't in this case, so, at least on the LPC176X platform, it is testing something.

The LPC1768 has a flash starting at 0x00000, until 0x80000. The default vector table location is at the start of the flash (so 0x00000). So this is below 0x10000000, and the code will copy it to the RAM. Where the mbed lib places it at 0x10000000, and so subsequent calls to SetVector won't re-allocate the vector table, but the first one will.

Yup, understood.

Hang on, maybe I've misunderstood.  The script is:
        printf("Starting first test (interrupts not relocated).\r\n");
        bool ret = test_once();
        if (ret == false) {
            MBED_HOSTTEST_RESULT(false);
        }

        printf("Starting second test (interrupts relocated).\r\n");
        memcpy(int_table, (void*)SCB->VTOR, sizeof(int_table));
        SCB->VTOR = (uint32_t)int_table;

        bool ret = test_once();
        if (ret == false) {
            MBED_HOSTTEST_RESULT(false);
        }

...so in the second part it does the copy and sets SCB->VTOR to 0x10000400 in my case.  Inside the test_once() function there is the call you are referring to which ultimately gets to NVIC_SetVector():
#define NVIC_RAM_VECTOR_ADDRESS   (0x10000000)  // Location of vectors in RAM

void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
    uint32_t *vectors = (uint32_t*)SCB->VTOR;
    uint32_t i;

    // Copy and switch to dynamic vectors if the first time called
    if (SCB->VTOR < NVIC_RAM_VECTOR_ADDRESS) {
        uint32_t *old_vectors = vectors;
        vectors = (uint32_t*)NVIC_RAM_VECTOR_ADDRESS;
        for (i=0; i<NVIC_NUM_VECTORS; i++) {
            vectors[i] = old_vectors[i];
        }
        SCB->VTOR = (uint32_t)NVIC_RAM_VECTOR_ADDRESS;
    }

    vectors[IRQn + NVIC_USER_IRQ_OFFSET] = vector;
}

So, in my case, with SCB->VTOR set to 0x10000400, the copy in the script is what matters and the "first time" copy in NVIC_SetVector() won't have any effect.  Or have I misunderstood?

Well it first copies it from flash to 0x100000000. Then in the test suite it copies it for you from 0x100000000 to 0x1000000400. So both copies matter, but if the first copy already succeeds, it is kinda unlikely the second one would suddenly fail.

True, true.

Apart from that this scripts is just for one platform and outdated.. What compilers did you test this with? This one is not valid for IAR ,as they have pragma for that, and the toolchain header file mbed has does not contain aligment, netiher packed is properly defined there

I can accept this as it is, but this needs further improvements otherwise I don't see any benefit of this test.
@PrzemekWirkus You migth be interested in this file

The change was tested with GCCARM.  I only offer it as proof that there is an issue and a fix for it.  I've no problem if the solution is different or if the right answer it to delete the test as not being useful.

This test is only for LPC1768 and should be fixed.
So I would appreciate if we can merge it. Test is a test :)
@0xc0170: I think we can merge it! It is a valid contribution from Rob.
Tests for this pull request:
$ singletest.py --auto -n MBED_A18 --tc GCC_ARM,ARM,uARM
Test summary:
+--------+---------+-----------+----------+-----------------------------+--------------------+---------------+-------+
| Result | Target  | Toolchain | Test ID  | Test Description            | Elapsed Time (sec) | Timeout (sec) | Loops |
+--------+---------+-----------+----------+-----------------------------+--------------------+---------------+-------+
| OK     | LPC1768 | uARM      | MBED_A18 | Interrupt vector relocation |        6.15        |       15      |  1/1  |
| OK     | LPC1768 | GCC_ARM   | MBED_A18 | Interrupt vector relocation |        6.15        |       15      |  1/1  |
| OK     | LPC1768 | ARM       | MBED_A18 | Interrupt vector relocation |        6.25        |       15      |  1/1  |
+--------+---------+-----------+----------+-----------------------------+--------------------+---------------+-------+
Result: 3 OK

Completed in 29.50 sec

While if the test stays this should certainly be included, I still wonder what the test is supposed to add. The InterruptIn code already does the same: If it does not work, InterruptIn tests will fail. It will never happen that it does complete the first test here, but fails at the second one.

This test verifies that NVIC_SetVector() actually sets the interrupt vector for the desired IRQn in the manually reallocated vector table instead of assuming that it has been moved to the typical location in RAM (NVIC_RAM_VECTOR_ADDRESS) when not in FLASH.  Previous to https://github.com/mbedmicro/mbed/commit/5655d2fc2af27278bc83e1bf66b707b212c3723a the code just assumed that if the vectors weren't in FLASH then they must be at NVIC_RAM_VECTOR_ADDRESS.  That was fixed in the noted commit and this test added at the same time.

This test was added as a regression for a fixed bug and this particular fix for the test is valid, so I'm going to merge it.


 has no method 'homedir'

/usr/lib/node_modules/letsencrypt-express/bin/lex.js:9
var homedir = require('os').homedir();
^
TypeError: Object # has no method 'homedir'

You've got an ancient version of node that's a few years old (v0.10 or so, I'm guessing) and you should upgrade.

Also, you can shim / polyfill your version of node to fix it:
var path = require('path');

require('os').homedir = function (subDir) {
  var baseDir = process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'];
  return (subDir) ? path.join(baseDir, subDir) : baseDir;
};

Yep. That was it. Doh!


After istio version upgrade the ".items[N].spec.tag" for istioOperator is not changed to the newer version

Is this the right place to submit this?

[X] This is not a security vulnerability or a crashing bug
[X] This is not a question about how to use Istio

Bug Description
Im using istioctl to install / upgrade the istio in my clusters hosted in OCI. The upgrade from 1.15.1 to 1.16.0 happened without any errors, but when I checked the ".items[0].spec.tag" for istioOperator, it still points to 1.15.1
This behavior seems to be inconsistent as I see some of my other clusters have the tag value correctly pointing to 1.16.0
And I see all the proxies, control-plane, and data-plane are showing as 1.16.0 .
What is the significance of ".items[0].spec.tag" and how is it being used? I thought this was from where the istio operator picks up the value of the image tag to be used.
After upgrading istio from 1.15.1 to 1.16.0
kubectl get IstioOperator -n istio-system -o jsonpath='{.items[0].spec.tag}'
1.15.1

Version
istioctl version
client version: 1.16.0
control plane version: 1.16
data plane version: 1.16-dev (37 proxies)

kubectl version  --short
Flag --short has been deprecated, and will be removed in the future. The --short output will become the default.
Client Version: v1.25.4
Kustomize Version: v4.5.7
Server Version: v1.24.1

Additional Information
No response

What is the significance of ".items[0].spec.tag" and how is it being used? I thought this was from where the istio operator picks up the value of the image tag to be used.

This is correct.
You may check again using istioctl manifest generate to see if the tag is rendered correctly.


disable/hide sidebar at onload

Is there an option to hide or disable sidebar at onload event? I'm currently relying on custom $('.sidebar-toggle-button').click() to hide it, but wondering if there is native support or options.

hi, this will not work on mobile browser

Interesting, how does closing the sidebar work on mobile?


Invalid SPDX generated when config file is not found

When config file is not found, the program should stop with an error message and not create an invalid SPDX file.
compose -d NSP-22-9-test1 -s NSP-22-9-test1.spdx

...generating composed SPDX document from directory: NSP-22-9-test1
...using config: config.yaml
failed reading yaml file
 open config.yaml: no such file or directory
...document saved to NSP-22-9-test1.spdx in "tv" format

Examples of invalid SPDX generated as it has no value for "packageName":
##### Package:
SPDXID: SPDXRef-Package-

##### Relationships
Relationship: SPDXRef-DOCUMENT DESCRIBES SPDXRef-Package-
Relationship: SPDXRef-- DESCRIBES SPDXRef-NSP-22-9-test1-
Relationship: SPDXRef-- DESCRIBES SPDXRef-analytics-action-processor-app-22-9-0-rel-image-

Thank you @vargenau ! With the current implementation it makes sense to fail.


npm install on Docker fails to load binary, builds from source, fails

Is there an existing issue for this?

[X] I have checked for existing issues https://github.com/getsentry/profiling-node/issues
[X] I have reviewed the documentation https://docs.sentry.io/
[ ] I am using the latest SDK release https://github.com/getsentry/profiling-node/releases

[x] Tested below

How do you use Sentry?
Sentry Saas (sentry.io)
SDK Version
"@sentry/node": "7.55.2", "@sentry/profiling-node": "1.0.4"
Link to Sentry event
No response
What environment is your node script running in?
Docker image: node:18.14.0
MacOS: 13.4 (22F66)
Apple M1 Pro
How is your code deployed and bundled?
Local dev runs app within Docker w/ docker-compose
Dockerfile
FROM node:18.14.0
WORKDIR /app
COPY package.json .
COPY apps ./apps
COPY packages ./packages
COPY ./.env .
RUN npm install --include=optional

Steps to Reproduce

Have an Apple Silicon Mac (M1/M2) as the host machine
npm install -D @sentry/profiling-node to add package to project
npm install as a Docker step

Expected Result
NPM install finds prebuilt binary and succeeds
Actual Result

NPM Install Error

0 105.1 npm ERR! code 1
#0 105.1 npm ERR! path /app/node_modules/@sentry/profiling-node
#0 105.1 npm ERR! command failed
#0 105.1 npm ERR! command sh -c node scripts/check-build.mjs
#0 105.1 npm ERR! @sentry/profiling-node: Precompiled binary found, attempting to load...
#0 105.1 npm ERR! @sentry/profiling-node: Precompiled binary found but failed loading
#0 105.1 npm ERR! @sentry/profiling-node: Compiling from source...
#0 105.1 npm ERR! gyp info it worked if it ends with ok
#0 105.1 npm ERR! gyp info using<EMAIL_ADDRESS>#0 105.1 npm ERR! gyp info using<EMAIL_ADDRESS>| linux | arm64
#0 105.1 npm ERR! gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
#0 105.1 npm ERR! gyp http GET https://nodejs.org/download/release/v18.14.0/node-v18.14.0-headers.tar.gz
#0 105.1 npm ERR! gyp http 200 https://nodejs.org/download/release/v18.14.0/node-v18.14.0-headers.tar.gz
#0 105.1 npm ERR! gyp http GET https://nodejs.org/download/release/v18.14.0/SHASUMS256.txt
#0 105.1 npm ERR! gyp http 200 https://nodejs.org/download/release/v18.14.0/SHASUMS256.txt
#0 105.1 npm ERR! gyp info spawn /usr/bin/python3
#0 105.1 npm ERR! gyp info spawn args [
#0 105.1 npm ERR! gyp info spawn args   '/app/node_modules/node-gyp/gyp/gyp_main.py',
#0 105.1 npm ERR! gyp info spawn args   'binding.gyp',
#0 105.1 npm ERR! gyp info spawn args   '-f',
#0 105.1 npm ERR! gyp info spawn args   'make',
#0 105.1 npm ERR! gyp info spawn args   '-I',
#0 105.1 npm ERR! gyp info spawn args<EMAIL_ADDRESS>#0 105.1 npm ERR! gyp info spawn args   '-I',
#0 105.1 npm ERR! gyp info spawn args   '/app/node_modules/node-gyp/addon.gypi',
#0 105.1 npm ERR! gyp info spawn args   '-I',
#0 105.1 npm ERR! gyp info spawn args   '/root/.cache/node-gyp/18.14.0/include/node/common.gypi',
#0 105.1 npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
#0 105.1 npm ERR! gyp info spawn args   '-Dvisibility=default',
#0 105.1 npm ERR! gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/18.14.0',
#0 105.1 npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/app/node_modules/node-gyp',
#0 105.1 npm ERR! gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/18.14.0/<(target_arch)/node.lib',
#0 105.1 npm ERR! gyp info spawn args   '-Dmodule_root_dir=/app/node_modules/@sentry/profiling-node',
#0 105.1 npm ERR! gyp info spawn args   '-Dnode_engine=v8',
#0 105.1 npm ERR! gyp info spawn args   '--depth=.',
#0 105.1 npm ERR! gyp info spawn args   '--no-parallel',
#0 105.1 npm ERR! gyp info spawn args   '--generator-output',
#0 105.1 npm ERR! gyp info spawn args   'build',
#0 105.1 npm ERR! gyp info spawn args   '-Goutput_dir=.'
#0 105.1 npm ERR! gyp info spawn args ]
#0 105.1 npm ERR! gyp info ok
#0 105.1 npm ERR! gyp info it worked if it ends with ok
#0 105.1 npm ERR! gyp info using<EMAIL_ADDRESS>#0 105.1 npm ERR! gyp info using<EMAIL_ADDRESS>| linux | arm64
#0 105.1 npm ERR! gyp info spawn make
#0 105.1 npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
#0 105.1 npm ERR! gyp info ok
#0 105.1 npm ERR! node:fs:1039
#0 105.1 npm ERR!   handleErrorFromBinding(ctx);
#0 105.1 npm ERR!   ^
#0 105.1 npm ERR!
#0 105.1 npm ERR! Error: ENOENT: no such file or directory, rename<EMAIL_ADDRESS>-><EMAIL_ADDRESS>#0 105.1 npm ERR!     at Object.renameSync (node:fs:1039:3)
#0 105.1 npm ERR!     at file:///app/node_modules/@sentry/profiling-node/scripts/copy-target.mjs:18:4
#0 105.1 npm ERR!     at ModuleJob.run (node:internal/modules/esm/module_job:194:25) {
#0 105.1 npm ERR!   errno: -2,
#0 105.1 npm ERR!   syscall: 'rename',
#0 105.1 npm ERR!   code: 'ENOENT',
#0 105.1 npm ERR!   path<EMAIL_ADDRESS>#0 105.1 npm ERR!   dest<EMAIL_ADDRESS>#0 105.1 npm ERR! }
#0 105.1 npm ERR!
#0 105.1 npm ERR! Node.js v18.14.0
#0 105.2 npm ERR! @sentry/profiling-node: Failed to build from source, please report this a bug at https://github.com/getsentry/profiling-node/issues/new?assignees=&labels=Type%3A+Bug&template=bug.yml

same issue here

Hmm, I suspect the root of the issue here is. Are you by any chance including node_modules from the host machine? It should be ignored and node_modules should be freshly installed.
#0 91.52 npm ERR! node:internal/modules/cjs/loader:1310
#0 91.52 npm ERR!   return process.dlopen(module, path.toNamespacedPath(filename));

I tried searching online and found and issue that appears to be of similar nature - https://github.com/kelektiv/node.bcrypt.js/issues/635
The recommendation is to make sure you add node_modules to .dockerignore so that installation is always fresh and to reinstall the package. Would you mind testing that for me and let me know if it works? Meanwhile I will try and reproduce this myself

@JonasBa I can recreate this pretty easily with a Dockerfile that looks like this:
FROM node:18 AS build-env
WORKDIR /app

RUN npm install --save @sentry/node @sentry/profiling-node

It works correctly only on node:20, looks like because on node:20 the precompiled binary works. The actual compilation seems to fail on ARM64 on anything under node:20.
@ak-beam are you able to update your system to node:20?

@ak-beam I remember reading about a breaking change that crept in between node .14 to .16 (trying to find the link to the issue)... We prebuild binaries on .16 as the minor version, can you test if using 18.16 fixes your problem?

I'm receiving that error running a Dockerfile with FROM node:20-alpine
And package.json with
"@sentry/node": "^7.93.0",
"@sentry/profiling-node": "^1.3.3",

Error:
 => [4/7] RUN npm install --production                                                                                74.6s
 => => # npm ERR! command failed
 => => # npm ERR! signal SIGSEGV
 => => # npm ERR! command sh -c node scripts/check-build.mjs
 => => # npm ERR! @sentry/profiling-node: Precompiled binary found, attempting to load<EMAIL_ADDRESS> => => # npm ERR! @sentry/profiling-node: Precompiled binary found, skipping build from source.
 => => # npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-01-12T14_41_17_368Z-debug-0.log

I'm having this issue randomly with php:8.2-fpm-alpine with alpine's nodejs apk
App's package.json contains
"@sentry/node": "^7.102.1",
"@sentry/profiling-node": "^7.102.1",
"@sentry/vite-plugin": "^2.14.2",
"@sentry/vue": "^7.102.1",
"@sentry/integrations": "^7.108.0",

Output is as below

npm ci
npm WARN deprecated<EMAIL_ADDRESS>Please use @jridgewell/sourcemap-codec instead
npm ERR! path /home/app/app/frontend-app/node_modules/@sentry/profiling-node
npm ERR! command failed
npm ERR! signal SIGSEGV
npm ERR! command sh -c node scripts/check-build.js
npm ERR! @sentry/profiling-node: Precompiled binary found, attempting to load /home/app/app/frontend-app/node_modules/@sentry/profiling-node/lib/sen
try_cpu_profiler-linux-x64-musl-115.node
npm ERR! @sentry/profiling-node: Precompiled binary found, skipping build from source.
npm ERR! A complete log of this run can be found in: /home/app/.npm/_logs/2024-05-02T08_19_19_199Z-debug-0.log

In log file mentioned I can see following error messages:

3748 info run<EMAIL_ADDRESS>install node_modules/@sentry/profiling-node node scripts/check-build.js
3749 info run<EMAIL_ADDRESS>install { code: null, signal: 'SIGSEGV' }
3750 timing reify:rollback:createSparse Completed in 1880ms
3751 timing reify:rollback:retireShallow Completed in 0ms
3752 timing command:ci Completed in 32066ms
3753 verbose stack Error: command failed
3753 verbose stack     at ChildProcess. (/usr/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
3753 verbose stack     at ChildProcess.emit (node:events:518:28)
3753 verbose stack     at maybeClose (node:internal/child_process:1105:16)
3753 verbose stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
3754 verbose pkgid<EMAIL_ADDRESS>3755 verbose cwd /home/app/app/frontend-app
3756 verbose Linux 5.4.274-1.el7.elrepo.x86_64
3757 verbose node v20.12.1
3758 verbose npm  v10.2.5
3759 error path /home/app/app/frontend-app/node_modules/@sentry/profiling-node
3760 error command failed
3761 error signal SIGSEGV
3762 error command sh -c node scripts/check-build.js
3763 error @sentry/profiling-node: Precompiled binary found, attempting to load<EMAIL_ADDRESS>3763 error @sentry/profiling-node: Precompiled binary found, skipping build from source.
3764 verbose exit 1
3765 timing npm Completed in 32422ms


Implement /search/transactions endpoint

Hi team,
The /search/transactions seems missing. I cannot see the service and the endpoint returns 404. Would it be hard to implement?
Cheers
Fernando

Hey @fboucquez, Yes this is not implemented yet. I will take a look how easy or hard would it be to implement.

Thanks @shrimalmadhur , just for fun, I'm creating a Rosetta explorer.
https://github.com/fboucquez/rosetta-explorer
The search is pretty much required to do any type of Transaction search by hash (without knowing the block index) or transaction pagination. Block search/pagination would also be nice, but it's not in the API.
Do you know or have running rosetta nodes with different implementations. I am keen to test the explorer against different blockchains. If there are free open nodes up there, I can save time, resources, and effort setting up nodes.
I know lunar.dev used to have, but that service seems down. https://twitter.com/_lunardev

Hey @fboucquez , this is amazing. I actually was building one by myself as a way to learn react. But as a newbie JS developer it was taking time. But I think this is great and I will if I can help contribute to do this.  I was initially just creating etherscan like UX without search like https://localhost:8080/block/<block_hash> so I didn't think of implementing search.
Search API - yea I think we should implement pagination. If you would like to propose changes to rosetta-specs. feel free to create an issue in that repo ( We are also working on formal Rosetta Improvement Proposal spec to make spec changes)
We currently don't have these nodes as a service. I will see what I can do. I might be able to spin up a node on AWS and share with you the endpoint if that helps.

Hi @shrimalmadhur , great!
Feel free to contribute to the rosetta explorer. It's also Etherscan like, of course without any bell or whistle yet. It's fairly new, build it and have a look when you have the time.
The stack is React, NextJS, Typescript with serverside rendering using the rosetta generated client I was talking about in another issue.
If we can have external Bitcoin, Etherum, Solana, etc rosetta nodes, we can connect the explorer to them.
I would like to eventually deploy the explorer to VPC (or serverless) on AWS, Vercel, Hetzner, etc.
Cheers!


An unhandled exception occurred: Cannot find module './extra-webpack.config.js'

Getting an error
An unhandled exception occurred: Cannot find module './extra-webpack.config.js'

Thks @layinka  for pointing this put, I was busy lately and not working on the project, however the lastest version avoid the extra-webpack-config and should work.


[MoP] Mapping "unspecified" labels

Simpler for me explaining with an example.
In MARC file, you can find as medium of performance orchestra.
In the vocabulary, there is orchestra - unspecified, that conceptually should be the same.
The String2URI fails in this case.
Probably this problem will disappear when we will complete the alignment for the MoP (so more labels will be available). But we should keep in mind this possible issue.

For the medium of performances, the source data in MARC makes use of labels or of codes? Does this vary depending if it comes from Philharmonie or BnF? In your example, this was Intermarc or Unimarc?
I agree, when the vocabulary will be aligned and consolidated, the problem should be resolved but this is useful to keep it in mind.

For the medium of performances, the source data in MARC makes use of labels or of codes? Does this vary depending if it comes from Philharmonie or BnF? In your example, this was Intermarc or Unimarc?

Both PP and BnF, both Intermarc and Unimarc, make use of labels in French (actually the problem was between orchestre and orchestre - non spécifié).

As proposed by @marie-ototoi, we can remove the  - unspecified part, because we defined broader/narrower relationship (see #2 ).


Changing when the vectorized environments return done=True

I am trying to create vectorized environments that return done=True only when certain episodes have passed, say 2. So in coinrun, when the agent dies (or gets the coin) the first time, the step function should not return done=True. It should only return done=True in the second episode.
More specifically, I am trying to create vectorized trials, rather than episodes, as in the RL^2 paper.
(It would also be great if I can return some additional stuff from the environment every step.)
What would be the easiest way to achieve this?

You should be able to write a wrapper of the baselines VecEnv interface that overrides the value from done, have you tried that yet?
The more complicated way is to change the C++ code to behave how you want, which I would only recommend if there's no way to do this in python.
Adding information into the info dictionary from the python side is straightforward.  If you want to add things from the C++ side it's fairly complicated, see this comment: https://github.com/openai/procgen/issues/32#issuecomment-589868469

Closing due to lack of activity.


proposal: path/filepath: Sanitize

It is common for programs to accept filenames from untrusted sources. For example, an archive extractor might create files based on names in the archive, or a webserver may serve the content of local files identified by a URL path. In these cases, the program should usually sanitize the untrusted filenames before use. (See #55356 for a list of vulnerabilities caused by using unsanitized archive paths.)
We should provide a simple path sanitization function which accepts an untrusted input and returns something reasonably safe.
// Sanitize returns a representation of path under the current
// directory. If path is absolute or represents a location
// outside the current directory, Sanitize returns an error.
//
// Sanitize calls Clean on the result, but retains a trailing Separator if any.
//
// If a base path is joined to the result of Sanitize with Join,
// the resulting path will be contained within basepath.
//
// Sanitize does not consider symbolic links.
// Symbolic links can cause the sanitized path to reference a location
// outside the current directory.
func Sanitize(path string) (string, error)

Examples:
Sanitize("a") = "a", <nil>
Sanitize("a/b") = "a/b", <nil>
Sanitize("a/b/../c") = "a/c", <nil>
Sanitize("../a") = "", "../a" is outside the current directory
Sanitize("..") = "", ".." is outside the current directory
Sanitize(".") = "", "."

I like the idea but when I saw the issue title, it's purpose wasn't at all clear to me from the name "Sanitize". It's not about cleanliness (we already have "Clean") but security. Maybe something as simple as "Safe", but with a name like that perhaps it should consider symbolic links. Perhaps it should anyway. A conundrum.

I'm not sold on the name, although "Sanitize" does have the connotation of being more than just clean. ("To reduce or eliminate pathogenic agents", says Merriam-Webster.)
Symbolic links are an interesting question. If we do consider them, then we need to know the base path that the untrusted path is relative to. Not all users will want to avoid symbolic links, either; an archive extractor writing to an output file wants to avoid writing through symlinks, but a web server probably wants to follow links in the directory it is serving from. In some cases, there might be a race condition between checking for the presence of a link and writing to the file.

I lean towards not handling symlinks. Besides the raciness that neild mentions, once the program opens the sanitized path, there's other edge cases that could possibly cause trouble, so it's hard to guarantee complete safety:

Linux bind mounts could still lead you to write a file in a parent directory
Some filesystems could alter or not support the sanitized filename, e.g. case insensitive filesystems

I think this API would still be safe for a fairly common use case: extracting files from an archive (like a txtar) into a new directory. In that case, you don't have to worry about symlinks.
As for the name: I understand API as "the file path is relative and a child". I agree with Rob that I'm not a big fan of Sanitize, mainly because it doesn't give me that idea. Perhaps BoundedRelative, in the sense that we want a relative path that is "bounded to" the "dot" directory.

To restrict a path to some other working directory, you join the sanitized path to that directory:
sanitized, err := filepath.Sanitize(untrusted)
if err != nil { /* ... */ }

// path is guaranteed to be under /base/dir.
path := filepath.Join("/base/dir", sanitized)

One distinction between this and JoinInDir is that the above will return an error if the untrusted path is absolute, while JoinInDir--if consistent with Join--will silently convert absolute paths into relative ones. (JoinInDir("/a", "/b") is presumably "/a/b")
But I agree that it's very common to want to safely append an untrusted path to a trusted one, so perhaps the right operation here is a safer join.
I do think the function name should convey a sense that it's more secure than the alternatives. JoinInDir is descriptive, but doesn't strongly indicate that it's more suitable for use on untrusted inputs than Join. Perhaps SafeJoin?

For relative paths, maybe there's a tree-reflexive property, where joining a relative path with a prefix only results in targeting the subset of nodes that are the child nodes of the prefix. The mental hiccup is assuming tree-reflexivity when that's not a general property of relative paths.
I think coercing the tree-reflexive property (or an error) from a relative path can be seen as a unary operation on a relative path, or a binary operation on a relative path with nothing.
RefSafe(prefix string, rel string) with the tweaked notion of reflexivity for e.g. RefSafe("", "../") I think would be easy enough to grok. It could handle an empty, relative, or absolute prefix.
Still, ChildSafe() would be fun.

ISTM, most (all?) cases where you would want to use this involve os paths (since an fs.FS is rooted anyway) and joining to a base. I'm not sure when you would use path.Sanitize and not immediately turn around and do filepath.Join. So maybe it should just be filepath.SafeJoin(base, followSymlinks bool, paths ...string) string.

SafeJoin seems easier to reason about, and I agree that most cases where you want this are going to join the path to a base anyway.
I'm not sold on the followSymlinks parameter. At worst, this provides a false sense of security and space for TOCTOU bugs; the fact that no symlink exists along that path now says nothing about the future.

I'm not sure when you would use path.Sanitize and not immediately turn around and do filepath.Join.

I think there are use cases where it's "eventually" or even "never", rather than "immediately". For example, a CLI tool taking a path as an argument might not Join until a non-trivial amount of work is done, but if it's going to fail when Sanitize fails it would be better to reject when parsing arguments.

Thinking more about symlinks, filename sanitization is the wrong time to check for links. Links need to be checked for atomically at file open time, to avoid TOCTOU bugs. Possibly this indicates that we should have a function or functions in the os package to securely open files without traversing symlinks, but I don't think filepath is the right place for this.
One issue with SafeJoin is that Join treats absolute paths in components after the first as relative paths. I don't think that's the right behavior for handling untrusted paths; an absolute path should be an error, not silently converted to a relative path.
Would it be reasonable for SafeJoin to be inconsistent with Join here?
Join("/a", "/b")     // /a/b
SafeJoin("/a", "/b") // error, /b is absolute

It should be an error if it escapes, regardless of how it does so. But SafeJoin("/a", "/a/b") should work fine.

It should be an error if it escapes, regardless of how it does so. But SafeJoin("/a", "/a/b") should work fine.

What if the base directory is a secret for some reason, then an attacker sends absolute paths until it finds one that succeeds? ISTM, it's safer to just fail any absolute paths in the paths parameter.

I believe we have two possible APIs at this point. One is a Sanitize function which takes a path and makes it safe. This is my original proposal (although I'm dropping the preservation of a trailing / here).
// Sanitize returns a representation of path under the current
// directory. If path is absolute or represents a location
// outside the current directory, Sanitize returns an error.
//
// Sanitize calls Clean on the result.
//
// If a base path is joined to the result of Sanitize with Join,
// the resulting path will be contained within basepath.
//
// Sanitize does not consider symbolic links.
// Symbolic links can cause the sanitized path to reference a location
// outside the current directory.
func Sanitize(path string) (string, error)

The other possibility is a SafeJoin.
// SafeJoin joins a base path to a relative path.
// The resulting path is guaranteed to contained within the base path.
// If relpath is an absolute path or contains any reference to a location outside the base path,
// SafeJoin returns an error. For example, SafeJoin("a", "../a/b") is an error, even though the
// final path is contained within the base path.
//
// SafeJoin calls Clean on the result.
//
// Sanitize does not consider symbolic links.
// Symbolic links can cause the resulting path to reference a location outside the base path.
func SafeJoin(basepath, relpath) (string, error)

Either of these functions may be trivially implemented in terms of the other.
func Sanitize(path string) (string, error) {
  return SafeJoin("", path)
}

func SafeJoin(basepath, relpath) (string, error) {
  s, err := Sanitize(relpath)
  if err != nil {
    return "", err
  }
  return Join(basepath, s)
}

Most use cases for sanitized paths will join an untrusted path to a trusted base directory, so SafeJoin directly supports the more common operation. However, SafeJoin is inconsistent with Join: Join("a", "/b") is "a/b", while SafeJoin considers this an error. (We could make SafeJoin consistent with Join here, but I'm not convinced that silently converting an untrusted absolute path to a relative one is the correct behavior.)
I lean slightly towards Sanitize, but only slightly.

Good summary. My preference is for SafeJoin. It feels like the more common case to me, and the names "Sanitize" vs. "Clean" are too similar and easy to get backwards.

(We could make SafeJoin consistent with Join here, but I'm not convinced that silently converting an untrusted absolute path to a relative one is the correct behavior.)

Could you give some more detail on that? It seems like the security property we want from SafeJoin is “no writes outside of a particular working directory”, but Join("a", "/b") → "a/b" does retain that property.
(And, for that matter, users who are familiar with Join can always precede the call to SafeJoin with a call to filepath.IsAbs, although I'm not entirely sure whether that would flag the argument "/b" on Windows.)

Could you give some more detail on that? It seems like the security property we want from SafeJoin is “no writes outside of a particular working directory”, but Join("a", "/b") → "a/b" does retain that property.

That retains this security property, but it introduces a silent rewrite of an unsafe path into a safe-but-different form. I think that it's much clearer to be explicit and to never attempt to transform a path.
For example, I think it's much better for a naive tar extractor to produce an error when trying to extract a file named /etc/passwd than to silently convert the filename to ./etc/passwd.
This also provides better behavior and consistency on Windows: SafeJoin(`a`, `C:\a`) is an error, not a\C:\a. SafeJoin(`a`, `\\host\share\b`) is not a\host\share\b.
If a user does want to convert absolute filenames to relative ones, this can be trivially achieved by prepending ./: SafeJoin(base, "./"+rel)

rejecting a path the user might have wanted is less hazardous than accepting one they might not have.

I don't think I agree with that. Rejecting a path that the user might have wanted will encourage them to use a different function instead, which carries its own risks.
I think the specification for the functions is clearer if they allow a relative path of ".". (“Outside” and “within” seem like clear enough words to describe what we mean.)

Another possible API:
// IsSafe reports whether the path refers to a location within the current directory.
// If path is absolute or references a location above the current directory, IsSafe returns an error.
// On Windows, IsSafe will return an error if path refers to a reserved filename such as "NUL".
//
// If IsSafe(path) returns nil, then Join(base, path) will always produce a path contained within base.
//
// IsSafe does not consider symbolic links, which can cause the file named by path to exist outside
// the current directory.
func IsSafe(path string) error

Sanitize and SafeJoin are just an IsSafe check followed by Clean or Join.

I like the functionality of IsSafe, but I'm not fond of the name.  There can be unsafe paths in the current directory (What if the current directory happens to be /dev?  What if the path refers to a symlink to elsewhere?).  What about IsLocalPath?

I don't understand Sanitize and IsSafe. A path cannot be safe in and of itself, it can only be safe for use in a particular context. And the proposed functions don't have that context.
I'm more partial to SafeJoin. But it seems like what is really called for is something like func SafeOpenInDir(root, path string) (*os.File, error) which would also be able to do symlink checks, etc.

There is no universal definition of "safe", but there is a category of paths which reference locations within are lexically contained within some root. Perhaps there's a better name for these paths than "safe" or "sanitized".
IsLocalPath feels like the inverse of IsNetworkPath, which isn't right.
I think the name should convey a sense that this is a function one uses on untrusted paths to make them trustworthy (within limits).

But it seems like what is really called for is something like func SafeOpenInDir(root, path string) (*os.File, error) which would also be able to do symlink checks, etc.

I think there's a good argument to be made for a function like SafeOpenInDir, although I'm not sure exactly what it should look like. It's not a replacement for Sanitize/SafeJoin/IsSafe, however. For example (as mentioned in https://github.com/golang/go/issues/56219#issuecomment-1278168302), a webserver serving static files will want to sanitize untrusted paths to avoid escaping the content root, but may well want to follow symlinks because the local filesystem is considered to be trusted. (And indeed, this is exactly what http.FileSystem does.)
It's worth noting that of the CVEs stemming from the lack of filename sanitization in archive/tar and archive/zip (see #55356), I don't believe any are due to inadvertent symlink traversal. Symlink traversal generally only becomes a vulnerability when the attacker has some level write access to the filesystem; this is a comparatively unusual scenario.

there is a category of paths which reference locations which are lexically contained within some root.

Yes, that is what I was trying to get at with IsLocalPath.  What is a good name for that category of paths?

there is a category of paths which reference locations which are lexically contained within some root.

Yes, that is what I was trying to get at with IsLocalPath. What is a good name for that category of paths?

UnrootedPath?
FloatingPath?
PathFragment?
Subpath?

I tend to agree that the names “safe” and “sanitize” are not particularly descriptive, especially if new categories of unsafe or unsanitary paths are uncovered in the future. (Compare with, say, the word “new” used in an API to refer to version 2 of something.)
Moreover, I'm not sure that the word “Safe” is all that helpful in directing users to the appropriate API: if the user is reading the documentation, then it probably suffices to add a short sentence near the beginning of the function's doc comment (like “For most uses, prefer JoinInDir as a safer alternative.”). If the user is not reading the documentation (and is instead coding from memory),  then it's probably better for the new function to have a name starting with a common prefix with the less-safe alternative: that makes it more likely to be noticed in autocomplete results and more likely to be noticed when looking at the original function's documentation on https://pkg.go.dev.

I don't think the IsSafe API is all that useful. Consider how it would be used:
if err := filepath.IsSafe(rel); err != nil {
	return fmt.Errorf(…, err)
}
abs := filepath.Join(dir, rel)

But if the user remembers to do that, why wouldn't they just do the equivalent post-Join check using the existing API?
abs := filepath.Join(dir, rel)
if clean, err := filepath.Rel(dir, abs); err != nil {
	return fmt.Errorf(…, err)
} else if elem, _, _ := strings.Cut(clean, filepath.Separator); elem == ".." {
	return fmt.Errorf(…, err)
}

Not much more code, but two function calls, two constants (Separator and ..), it incorrectly accepts dir="a", rel="../a", and I'm pretty sure that doesn't handle NUL correctly at the moment. Path sanitization is tricky.
If new categories of unsafe or unsanitary paths are discovered, then we should detect them in the proposed functions. That's another reason we need some form of API for path sanitization: To capture user intent. (Contrast filepath.Abs, where we don't know if the user is asking if a path will still refer to the same entity if the current directory changes, or if the path escapes the current directory. These are the same question on Unix, but not on Windows.)
I'm increasingly convinced that "safe" or "sanitized" is the right word to use here. The property we are concerned with here is lexical safety: Paths from untrusted sources which have been confirmed safe to use. A name like JoinInDir is descriptive, but does not capture the intent of the operation.

If new categories of unsafe or unsanitary paths are discovered, then we should detect them in the proposed functions.

It is not at all obvious to me that the notion of “safe” is precise or universal enough for that to align with the Go compatibility policy. “Lexically in the same directory” is a clear property for which we can surely promise backward-compatibility. “Safe to use” requires additional context (“...for what purpose?”) and may mean different things to different users.
For example, note how many comments on this issue alone are concerned with symlinks. I do not consider symlinks “unsafe” to use, although they may certainly be unsafe to create — but I don't think my opinion on the safety of symlinks is universally held.

“Lexically in the same directory” is a clear property for which we can surely promise backward-compatibility.

Alas, this is also not the right property. "COM1" is lexically in the current directory, but it is not safe on Windows.

It sounds like the current proposal is https://github.com/golang/go/issues/56219#issuecomment-1291093409.
I assume that IsSafe("C:foo") is false on Windows even if you are currently running in a directory on drive C.
It sounds like there is some debate about whether Safe is the right name, but people seem to agree with the semantics.
Do I have all that right?

It sounds like the current proposal is https://github.com/golang/go/issues/56219#issuecomment-1291093409.
I assume that IsSafe("C:foo") is false on Windows even if you are currently running in a directory on drive C.
It sounds like there is some debate about whether Safe is the right name, but people seem to agree with the semantics.
Do I have all that right?

Yes.
We have three possible functions on the table (with some debate on naming): Sanitize, SafeJoin, and IsSafe. Of these, IsSafe (https://github.com/golang/go/issues/56219#issuecomment-1291093409) is the smallest and most focused API addition. Sanitize and SafeJoin are safer versions of Clean and Join; in contrast, IsSafe verifies that a relative path may be safely cleaned or joined.
Let's focus on IsSafe for this proposal. We could add SafeJoin or other functions in the future, but if so IsSafe is the foundation we will build on.
I think we have general agreement on the semantics. IsSafe will reject paths which lexically escape the current directory. IsSafe("C:foo") is false on Windows, as is IsSafe("/foo") (relative to the current drive) and IsSafe("./NUL") (reserved name). Joining a safe path to a base with Join(base, safe) is guaranteed to produce a path lexically contained within the base.
I favor the name IsSafe, but I don't believe we have consensus. I do feel that the name must convey that this function is intended to enforce a security property; if we discover some new category of unsafe path in the future (seems unlikely, but the future is large), we want to test for it here.
In the absence of consensus on the name, someone (the proposal committee, I presume) is going to have to make a decision.

I do feel that the name must convey that this function is intended to enforce a security property

This is exactly my concern. The names Sanitize and IsSafe convey that the function is intended to enforce “a security property”, but do not indicate what that security property actually is, nor why we should prefer that particular property over other possible meanings of “safe” or “sanitary”. I worry that that will encourage both overuse (because other paths will be seen as “unsafe” even when they are perfectly fine in context) and underuse (because developers won't be able to trust that our definition of “safe” will continue to match the definition they intend).
If we have a clear definition of the property we intend to enforce, that definition should not change over time, and it should suggest a more precise name as well.

I think we have general agreement on the semantics. IsSafe will reject paths which lexically escape the current directory. IsSafe("C:foo") is false on Windows, as is IsSafe("/foo") (relative to the current drive) and IsSafe("./NUL") (reserved name). Joining a safe path to a base with Join(base, safe) is guaranteed to produce a path lexically contained within the base.

I think I agree with that, and to me it suggests the name Escapes (with an inverted meaning):
// Escapes reports whether the given path may lexically refer to a file
// outside of its working directory, independent of the actual current
// working directory.
//
// Escapes returns true for:
//   - absolute paths, such as "/tmp" or "C:\windows"
//   - relative paths that cross a parent directory,
//     such as ".." or "../foo"
//   - paths relative to the root of the current drive,
//     such as "\Program Files" on Windows
//   - paths relative to the working directory on a specific drive,
//     such as "A:README.txt" on Windows
//   - paths that refer to reserved device names, such as
//     ".\NUL.txt" on Windows.
func Escapes(path string) bool

That would leave open the option to include other forms of “lexically escaping from its working directory”, should we discover any of those in the future, but clearly exclude other kinds of paths like “traverses a symlink to a parent directory” that folks might include in their own definition of “unsafe”.

So there would be a separate predicate for paths containing COM1 and such?

@jimmyfrasche, COM1 is a “reserved device name”.
(It would be included in the predicate because it refers to the global device — and, unlike a symlink, that property is independent of the current working directory.)

Are people happy with func Escapes as the name and semantics?

I can live with Escapes, although I think IsSafe is clearer.
Escapes is not really accurate for device filenames like NUL, since the file NUL can be viewed as existing in every directory of a Windows filesystem. NUL doesn't escape the working directory any more than the file null escapes from /dev/.
IsSafe does invite the question of what "safe" means, but I feel that question is both worth inviting and something which can be addressed by the function documentation.
In addition, while neither Escapes nor IsSafe will be readily comprehensible without reading the documentation, IsSafe more strongly indicates that it is a function one might want to reach for when handling untrusted inputs.

I still have concerns about how symlinks mix in here. If we make Escapes lexical only, which is perfectly reasonable, then it is asking an incomplete question that must be answered completely for true safety.
I'm not saying this is easy, quite the opposite. But a lexical-only solution doesn't feel right to me.

I agree that Escapes/IsSafe is incomplete for all cases.
For example, an old-school mail delivery agent that writes mail to ~user/Mailbox doesn't care about lexical sanitization but does care about preventing symlink traversal. Defending against symlink traversal cannot be done by path sanitization. Validating that a path does not currently refer to any symlinks is subject to TOCTTOU. The only reasonable defense is to perform the check atomically with the access operation. I think that will need to take the form of a new function in the os package.
But in some cases, a purely lexical answer is sufficient. A webserver serving static files from a directory probably does want to traverse symlinks, but it also wants to avoid accidentally serving files from outside that directory.

It's true that filepath really can't do much with symlinks due to races with symlinks changing underfoot. Use cases may also disagree about whether to respect the link or not. Results based on the file name itself are at least not racy and more commonly agreed on. I agree that we should keep symlinks separate from the name safety question.

Based on the discussion above, this proposal seems like a likely accept.
— rsc for the proposal review group

I want to see the documentation for this new function. What does it actually promise, and can it be concisely and clearly expressed?

// Escapes reports whether path lexically refers to a location contained within the current directory.
// Escapes returns true if path is empty, absolute, or references the current directory or a location above it.
// On Windows, Escapes returns true if path refers to a reserved filename such as "NUL".
//
// If Escapes(path) returns false, then Join(base, path) will always produce a path contained within base
// and Clean(path) will always produce an unrooted path with no ".." path elements.
//
// Escapes does not consider links, which can cause the location named by path to exist
// outside the current directory.
func Escapes(path string) bool

The handling of Escapes(".") is debatable. … A caller who wants to allow "." can easily do so.

Indeed, I would argue the opposite conclusion: most of the time, I have a temporary directory (possibly obtained by calling t.TempDir()) and I just want to make sure the thing I'm about to do is actually going to be somewhere in that directory.
Sometimes the thing I'm about to do is write a file, in which case I probably don't want to overwrite the directory, but I think that would fail anyway?
Sometimes the thing I'm about to do is set the Dir on an exec.Cmd, in which case I do want to allow the command to execute in the root of the directory.
So I can see some cases where allowing "." is useful, and some cases where allowing it permits a different (but still fairly benign)  failure mode; but I'm not aware of cases where it's actively dangerous. Thus, I prefer to allow it.

// Escapes reports whether path lexically refers to a location contained within the current directory.
// Escapes returns true if path is empty, absolute, or references the current directory or a location above it.
// On Windows, Escapes returns true if path refers to a reserved filename such as "NUL".
//
// If Escapes(path) returns false, then Join(base, path) will always produce a path contained within base
// and Clean(path) will always produce an unrooted path with no ".." path elements.
//
// Escapes does not consider links, which can cause the location named by path to exist
// outside the current directory.
func Escapes(path string) bool

What does "current directory" refer to? It's not the executable's cwd, because an absolute path won't match that necessarily.
The "If" sentence doesn't follow, by my reading, from introductory paragraph.

That missing "not" explains a lot!
I'll think about wording.

As suggested in my comment on the CL, I feel NonLocal is a much clearer and evocative name for what it does.

IsLocal, and invert the check? Avoids a double-negative.

I've updated https://go.dev/cl/449239 to:

Change the name to IsLocal. I think this is the best of the suggested alternatives so far. The Is prefix clearly indicates this is a predicate, and I agree with Rob that "Local" is clearer and more evocative.
Consider "." as local, so IsLocal(".")==true.

// IsLocal reports whether path, using lexical analysis only, has any of these properties:
//
//   - is within the subtree rooted at the current directory
//   - is not an absolute path
//   - is not empty
//   - on Windows, is not a reserved name such as "NUL"
//
// If IsLocal(path) returns true, then
// Join(base, path) will always produce a path contained within base and
// Clean(path) will always produce an unrooted path with no ".." path elements.
//
// IsLocal does not consider links, which can cause the location
// named by path to exist outside the current directory.
func IsLocal(path string) bool

has any of these properties

s/any/all/ ?

This looks like an improvement except for the mentions of "current directory".
IsLocal is a purely lexical question; the actual current directory is or should be irrelevant.
I suggest changing "is within the subtree rooted at the current directory"
to "is within the subtree rooted at the directory in which path is evaluated".
And I suggest changing the final paragraph to:
// IsLocal is a purely lexical operation. In particular, it does not account for
// the effect of any symbolic links that may exist in the file system.

Now:
// IsLocal reports whether path, using lexical analysis only, has all of these properties:
//
//   - is within the subtree rooted at the directory in which path is evaluated
//   - is not an absolute path
//   - is not empty
//   - on Windows, is not a reserved name such as "NUL"
//
// If IsLocal(path) returns true, then
// Join(base, path) will always produce a path contained within base and
// Clean(path) will always produce an unrooted path with no ".." path elements.

// In particular, it does not account for the effect of any symbolic links
// that may exist in the filesystem.
func IsLocal(path string) bool

Now that there is "IsLocal is a purely lexical operation" you can remove "lexical" from the beginning:
// IsLocal reports whether path has all of these properties:
//
//   - is within the subtree rooted at the directory in which path is evaluated
//   - is not an absolute path
//   - is not empty
//   - on Windows, is not a reserved name such as "NUL"
//
// If IsLocal(path) returns true, then
// Join(base, path) will always produce a path contained within base and
// Clean(path) will always produce an unrooted path with no ".." path elements.

// In particular, it does not account for the effect of any symbolic links
// that may exist in the filesystem.
func IsLocal(path string) bool

No change in consensus, so accepted. 🎉
This issue now tracks the work of implementing the proposal.
— rsc for the proposal review group

IsLocal will be in 1.20.


✨ race()

Motivation
Ports race from v2

I actually prefer this object-based API, but my tendency is to keep strictly to parity with the Promise.race() API and let enhanced APIs be built on top of that. This is something that we can always add later if we decide that there are no drawbacks.


parameter popup as own class

I've put it in playground now, will put it in an own file shortly

This PR is testable here: http://kasperpeulen.github.io/dart-pad/

I do see this again:

hmm.. that is strange, also on http://kasperpeulen.github.io/dart-pad/ ?

Yup, in firefox, safari, and chrome -

@devoncarew that is kind of strange, I'm also using a mac, and I don't see that in safari, chrome or firefox. Could this be an css caching issue ?

Yes, could be something like that.

Maybe the css is still cached from the version that din't work, what happens if you open it in private mode ?

@devoncarew I think it is fixed now, could you retest at http://kasperpeulen.github.io/dart-pad/ ?

@devoncarew I can't repro the problem, so I'll hand this one to you to shepard.

This looks great! Sorry for the long delay. Some small issues to address before landing. @lukechurch, once it does land, we should both run with the parameter_popup flag on in order to shake out any issues.

lgtm; I think you need to merge this to master or rebase, before I can merge it in.

Hm.. I have tried to merge it, I'm not an experienced git merger, so I hope
everything is fine.
2015-04-02 18:54 GMT+02:00 Devon Carew<EMAIL_ADDRESS>
lgtm; I think you need to merge this to master or rebase, before I can
merge it in.
—
Reply to this email directly or view it on GitHub
https://github.com/dart-lang/dart-pad/pull/219#issuecomment-88973587.

--
Kasper

Th
[warning] The argument type 'DartservicesApi (/home/travis/build/dart-lang/dart-pad/lib/dartservices_client/v1.dart)' cannot be assigned to the parameter type 'DartservicesApi (/home/travis/build/dart-lang/dart-pad/lib/dartservices_client/v1.dart)' at lib/playground.dart, line 252.
[warning] The argument type 'Editor (/home/travis/build/dart-lang/dart-pad/lib/editing/editor.dart)' cannot be assigned to the parameter type 'Editor (/home/travis/build/dart-lang/dart-pad/lib/editing/editor.dart)' at lib/playground.dart, line 252.
[warning] The argument type 'Context (/home/travis/build/dart-lang/dart-pad/lib/context.dart)' cannot be assigned to the parameter type 'Context (/home/travis/build/dart-lang/dart-pad/lib/context.dart)' at lib/playground.dart, line 252.

I don't get those warnings ??


what is the dataset for the pretrained models?

I might be missing something completely obvious, but what dataset are the models in the model zoo trained on? coco? imagenet? i can't find it anywhere, i'm not sure why it isn't documented anywhere

In my opinion, As the config shows, cfg.MODEL.WEIGHT is "catalog://ImageNetPretrained/MSRA/R-50", for example, so it should be ImageNet.

They run and give good results on MS COCO, so it must be MS COCO(though I couldn't find any document mentioning this)

From https://github.com/facebookresearch/maskrcnn-benchmark/blob/master/MODEL_ZOO.md#end-to-end-faster-and-mask-r-cnn-baselines

All the baselines were trained using the exact same experimental setup as in Detectron

And from Detectron MODEL_ZOO https://github.com/facebookresearch/Detectron/blob/master/MODEL_ZOO.md#common-settings-and-notes

All models and results below are on the COCO dataset.

I'd be happy to merge a PR adding this detail to the model zoo.

@as1392 I also feel like catalog://ImageNetPretrained/MSRA/R-50 is the trained COCO weight since outputs good predictions on COCO images.
But if this is true, https://github.com/facebookresearch/maskrcnn-benchmark/blame/master/README.md#L133 would be telling us to train our own COCO model starting from trained COCO weights, which does not make sense.
Is there something that I misunderstood?


Prepare support for multiple UFS's

What changes are proposed in this pull request?
Prepare the worker for accessing multiple UFS's as the client requests
Why are the changes needed?
Please clarify why the changes are needed. For instance,

If you propose a new API, clarify the use case for a new API.
If you fix a bug, describe the bug.

Does this PR introduce any user facing changes?
Please list the user-facing changes introduced by your change, including

change in user-facing APIs
addition or removal of property keys
webui

perfect for supporting recent multi ufs requirement, only thing to fulfill the requirement we probably need to find the way to support different configuration for different UFS ( starting with hdfs ), let's sync offline on this? In the same time will grab more info on the detailed requirement on my side

alluxio-bot, merge this please


After update 2017-07-25, "Material Theme Dark" not exist

Why "workbench.colorTheme": "Material Theme Dark" not work after update?
How I set Dark now?

@adrianoresende If you follow the directions in the readme it tells you how to open the Material Theme settings and activate the colorTheme of your choice. (I just did this on mac running the newest VsCode and newest Update)

https://github.com/equinusocio/vsc-material-theme/issues/75


Disable tracking from cookies

Hello!
We use Matomo in our Android/iOS project.
We need to be able to disable all the cookies tracked from users. We want to be able to disable the traking of the IP, geolocation, and all that stuff and only leave the custom tracking of actions and screens that we configured.
We saw in Matomo website that you can disable the cookies from the Admin page in the admin site of the dashboard. We did that, but we are still somehow tracking cookies from users.
Is there something that we have to configure in the Android/iOS App to stop tracking that?
Thanks!

BTW, when I'm talking about Cookies I mean like the IP, location, device and all those things that Matomo tracks by default.
What we want to know is if we can disable all those tracking info and leave only the parameters that we specifically are trying to track, like an Action or a Visit. Thanks!

Sorry, I at least can't help you, but maybe @d4rken knows more about

AFAIK, The Android SDK doesn't track IP or geolocation. The server takes the IP from the clients request and does geolocation on that. There are server-side settings to anonymize the ip addresses, not sure if it can be disabled completely.
The Android SDK gathers some details like user-agent and language. There is no direct way to disable that, but you can remove the data before sending it. Check getDefaultTrackMe in Tracker.java.