feat: add a certificate verifier matching an expected pre-shared key

This PR adds a rustls (Server|Client)Verifier accepting specifically correctly self-signed certificates where the signer is an expected signer.
As such, it only uses the certificate chain to make sure the certificate is indeed self-signed, and relies on the caller instantiating the scheme with an expected public key. The set of supported algorithms is limited to two mainstream algorithms, and may or may not be expanded to match those supported by webpki in the future.
To see an example where those custom verifiers are used, see:
https://github.com/quinn-rs/quinn/blob/main/quinn/examples/insecure_connection.rs

Ah ok, this is a new utility right?


Unable to find Kernel Credentials in Kernel Memory

Describe the bug
Unable to find Kernel Credentials in Kernel Memory using Sock puppet on iPad Pro 10.5 on 12.4.
TFP0 was successful. Any chance I can have access to latest src or help debugging? It's the patchfinder :/ OTA updated but also happens on iTunes restored devices.
To Reproduce
Steps to reproduce the behavior:

Open unc0ver
Select Sock puppet as exploit
Click Jailbreak
Wait for Result

Screenshots

Device (please complete the following information):

iOS Version: 12.4
iOS Device: iPad Pro 2nd Gen
unc0ver Version: 3.5.0

Place an "x" between the brackets if true:

[x] this is a bug others will be able to reproduce
[x] this issue is present with all tweaks uninstalled(except for default packages) or disabled
[x] this issue is present after a rootfs restore
[x] this issue is present on the latest version of unc0ver

Logs
diagnostics.zip

Same issue on iPhone 8, 12.4.

same problem, ip6s, sock puppet exploit.
(did rootfs before update, didnt restore)

same bug on iPhone X (GSM) ios 12.4

Same problem on my iPhone 8 using Sock Puppet exploit. I just updated via iTunes from iOS 12.1.1 to iOS 12.4. (No rootfs restore etc)

maybe try @
"If you are having that error at stage 2, delete and re-install the app and it should work."

@Martin already tried that after getting the error. Sadly its not fixxing the error.

maybe try https://twitter.com/Pwn20wnd/status/1163125251649110016
"If you are having that error at stage 2, delete and re-install the app and it should work."

This is correct.

This is correct. I didn't attribute the error to that because I literally unboxed the iPad 1 hour ago and didn't realize that the prefs were kept on the backup.

Its not working for me and also some others reporting that its not fixxing the problem.

I was having same issues as above - plus shinanigans error - iPhone(10,6) full iTunes update from 12.2 to 12.4. confirmed above... Remove and reinstalled Unc0ver (via impactor) several times (about 5); also turned off "Find My iPhone" and put into Airplane Mode for good measure. It took 2mins to reach step 10/31, reboot and another 5 mins to complete the jailbreak.
Such is the cross we bear as early adopters. Have patience and keep trying.

Got the same issue 7 Plus (previously jailbroken) but update by iTune.
After Delete the previous cert and revoke those cert also reinstall the Unc0ver 2 times it works fine.

Same problem on my iPhone 8 using Sock Puppet exploit. I just updated via iTunes from iOS 12.1.1 to iOS 12.4. (No rootfs restore etc)

I did the same thing. Reinstall the app and you should be fine


Adding xGitGuard pre commit hook

This allows the functionality exposed in xGitGuard to be used in the form a pre-commit hook instead of as a scan of github.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Parris, Stephen seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


@schema throws when we inherit an empty class

Hello,
As I was writing the test for #4, I discovered that the @schema decorator throws a TypeError when the parent class has
no props. In practice, this bug shouldn't append that much but when I got it I didn't really understand what was happening.
import 'reflect-metadata'
import { prop, schema, use } from "class-schema";

@schema()
class ParentSchema {
}

// ⬇ This one is throwing
@schema()
class ChildSchema extends ParentSchema {}

The stack trace is something like this:
     TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
      at __read (node_modules/class-schema/dist/decorators/schema.js:14:46)
      at /Users/v-mendele/Documents/projects/repro-class-schema/node_modules/class-schema/src/decorators/schema.ts:27:16
      at DecorateConstructor (node_modules/reflect-metadata/Reflect.js:541:33)
      at Reflect.decorate (node_modules/reflect-metadata/Reflect.js:130:24)
      at __decorate (test.ts:4:92)
      at Context.<anonymous> (test.ts:11:22)
      at processImmediate (node:internal/timers:473:21)

The trace points this line, maybe the array is not initialized, I didn't dig into it.
I made a reproduction repository with two test cases.
I can fix it if you want.
Have a nice day!

yes, i think because an array with props is added when a prop is inserted in a schema.
Using inheritance is trying to iterate undefined, so that's why it throws the error, I'll solve it soon (this week end at least), can you add a property rn for avoid this behavior?

I did it, no problem :)


Incorrect use of 'Offset'?

In the code snippet, it says delay = retryAfter.Date.Value.Offset. I don't think this is correct. Offset is the timezone difference from UTC time. The delay shouldn't be set to this. Surely this should be something like: delay = retryAfter.Date.Value - DateTime.UtcNow?

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

ID: 0e39c1df-517d-6390-d8ce-b2d33f573026
Version Independent ID: 4f48b14a-835b-e90e-a439-92398c0acf1d
Content: Errors and exceptions (MSAL) - Microsoft identity platform
Content Source: articles/active-directory/develop/msal-handling-exceptions.md
Service: active-directory
Sub-service: develop
GitHub Login: @jmprieur
Microsoft Alias: marsma

@dracan -
Thanks for brining this to our attention. We will investigate it further and update you shortly.

@dracan -
Thanks again for bringing this to our attention. We have updated the Doc and it will be live once its merged and approved.  We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


Crash when backspace near double byte unicode character

In vscode/extensions/typescript/src/typescriptServiceClient.ts on the line 142 with the salsa unicode character.

Insert a blank after salsa character (column 34)
backspace, backspace

-> Code crashes

@egamma Great find! I suspect it is a crash in oniguruma caused by us allowing for edits that cause invalid unicode points in multi-byte code points

I don't get a crash anymore after atom/node-oniguruma#49


Consider using xpcall in try block

Error message from pcall only include the first line that error happened but not the full stack traceback, but this can be done by compiling to using xpcall and pass debug.traceback as second arg:
local result
local function ____catch(err)
    print("catch:", err)
end
local ____try, ____hasReturned = xpcall(
    function()
        result = dosomething(args)
    end,
    debug.traceback
)
if not ____try then
    ____catch(____hasReturned)
end

Although custom plugin can implement this feature, but plugin can not rewrite lualib such as pcall in Promise.lua

Unfortunately, it is not as simple as replacing pcall with xpcall & debug.traceback.
Because using xpcall & debug.traceback will break our throw implementation.
e.g.
      try {
          throw "Hello, I am an Error!";
      } catch (error) {
          return error;
      }

would return:
Hello, I am an Error!
    stack traceback:
        [C]: in function 'error'
        [string \"...\"]:17: in function <[string \"...\"]:16>
        [C]: in function 'xpcall'
        [string \"...\"]:15: in function <[string \"...\"]:6>
        (...tail calls...)
        [string \"...\"]:3: in main chunk

instead of the correct/JS behavior
Hello, I am an Error!

This can possibly be solved by changing the way we throw string literals. Another solution might be to create a custom/adapted implementation of debug.tracepack.

Likely the best middle ground is that an empty catch block can compile to an xpcall, and a non-empty one can compile as-is. Same with un-caught rejected promise objects, if they don't already work that way.

https://github.com/TypeScriptToLua/TypeScriptToLua/blob/16a8eb3a5aed582f31d5f2306d70d3801983deca/src/lualib/Await.ts#L55-L58
coroutine.resume also lack of stack trace, the asyncCoroutine should pass into debug.traceback as the first argument to get the error trace in coroutine context.

-- Reimplemented pcall function
_G.pcall = function(func, ...)
    local results = table.pack(
        xpcall(func, function(err)
            -- Do nothing here, just return the error object
            return err..'\n'..debug.traceback()
        end, ...)
    )
    local status = table.remove(results, 1)
    if not status then
        -- When an error occurs, err is the error message, mimicking the behavior of pcall
        return false, table.unpack(results)
    else
        -- No error occurred, return all the additional parameters returned by xpcall
        return true, table.unpack(results)
    end
end

We can using xpcall to override pcall method to find the origin trackback


[Bug]: Dashes in Postgres Datasource Table Name Fail to Load

Is there an existing issue for this?

[X] I have searched the existing issues

Description
I currently am using a Postgres Datasource for my AppSmith UIs via AppSmith Cloud. However, when a table I'm working with has a dash in the name:
Example:

It completely fails to load:

All other data tables without dashes load fine.
Steps To Reproduce

Use a Postgres Datasource in AppSmith Cloud
Create a table in the Postgres Database
View the Datasource in AppSmith / attempt work with it

Public Sample App
No response
Environment
Production
Severity
High (Blocker to building or releasing)
Issue video log
No response
Version
Cloud

Most databases follow proper Postgres snakecase table name convention, however, this particular dataset didn't follow that convention hence the discovery.

@JosTheDude thank you for reporting the annoying bug! We are already tracking it in #30692 , so I am closing this one


write a program to creat circle with the given siameterin c

please assign this to me

@hi-vishal assigned to you


ReverseInFrontmatter relationship are not automatically refreshed in linked notes

When editing a note, adding a new relationship in the frontmatter, the related note does not refresh

fixed in v1.3.5


Multipart post with a zip file

I want to make a post request with faraday with a zip file and it fails with multipart-post.
I have this code :
   conn = Faraday.new(:url => "mon_url") do |conn|
          # POST/PUT params encoders:
        conn.request :multipart
        conn.request :url_encoded

        conn.adapter :net_http
    end

    file = StringIO.new( { "parameters" => {
                                     "neptune-import" => {
                                       "no_save" => false,
                                       "user_name" => "user",
                                       "name" => "Mon test",
                                       "organisation_name" => "organisation",
                                       "referential_name" => "test",
                                     }
                                   }
                  }.to_s )
    action_params_io = Faraday::UploadIO.new(file, "application/json", "parameters.json")

    transport_data_io = Faraday::UploadIO.new(::Zip::File.open("demo.zip"), "application/zip", "demo.zip")

    payload = {
                                                  :file1 => action_params_io,
                                                  :file2 => transport_data_io,
                        }

conn.post "http://", payload

And it returns an error on length method :
NoMethodError: undefined method `length' for #<Zip::File:0x007f0cb455eae8>
    from /home/luc/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/multipart-post-2.0.0/lib/composite_io.rb:102:in `method_missing'
    from (irb):47

Do you have any idea how I could do that with your gem?
Thanks for your time and your work
Luc Donnet

It looks like you are trying to decompress this file before you upload it. Are you sure you want to do that?
A zip file contains a directory structure, so it would be problematic to provide a length parameter that represents the size of all of its contents. It would also be problematic to try and present the directory structure output from a zip file as a single upload file.
You may want to read the documentation for Zip::File http://www.rubydoc.info/github/rubyzip/rubyzip/Zip/File

@sodabrew thanks - yeah, this is obviously a user issue, should really just be providing path to UploadIO.


How do I package the master branch code?

I want to use the latest version of incubator-skywalking-ui,i have some problems when i run the master branch code of incubator-skywalking-ui with the 5.0.0-alpha of incubator-skywalking

see doc, https://github.com/apache/incubator-skywalking/blob/master/docs/en/How-to-build.md#build-from-github


feat: reuse DRACOLoader instance

three.js docs suggest reusing  a single DRACOLoader instance, this PR does that
the options exposed in ThDRACOLoader.ts still work as expected

@NewYearNewPhil thank you for your contribution.
Would it be more clear to store the instance in the draco loader service?
In addition this service could have flag like
shareLoader ( default: true )
What do you think?

@demike Yes, makes total sense. I've changed the implementation to match.
While looking trough the three.js docs I also noticed there's an option to set a workerLimit to DRACOLoader, I've gone ahead and exposed it as well. Renamed the PR to fit the purpose.

Hi looks good. Just one small 'trailing space' linter issue. But then we are good to go!

@NewYearNewPhil Nice! Thank you! 🎉