PolymorphicAuthDynamicFeature Usage/Improvement

PolymorphicAuthDynamicFeature was added in an earlier 1.0 RC, and it seems to cover use cases in #1579, but I'm looking at the code, and there seems to be a flaw in the feature. In the Javadoc it states

Note that this feature only pertains to authentication. To enable authorization, use AuthDynamicFeature.

This sounds like the author would like us to use the PolymorphicAuthDynamicFeature in concert with AuthDynamicFeature. This doesn't really make much sense. The AuthDynamicFeature registers a filter that handles both authentication and authorization. It is not used only for authorization. Using both features would end up registering the filters twice, and having them called twice.
And also how are we expected to register AuthDynamicFeature. Say we have two filters for polymorphic feature
final BasicCredentialAuthFilter filterOne = new BasicCredentialAuthFilter.Builder<PrincipalOne>()
        .setAuthenticator(authenticatorOne)
        .buildAuthFilter();

final BasicCredentialAuthFilter filterTwo = new BasicCredentialAuthFilter.Builder<PrincipalTwo>()
        .setAuthenticator(authenticatorTwo)
        .buildAuthFilter();

register(new PolymorphicAuthDynamicFeature<>(ImmutableMap.of(
         PrincipalOne.class, filterOne,
         PrincipalTwo.class, filterTwo
)));

What do we do now with the AuthDynamicFeature? It only takes one filter. Are we supposed to register two AuthDynamicFeatures? There's isn't any documentation on intended usage.
@evnm It looks like you were the author of this. Did you have an intended usage for this being used along side authorization, or did your javadoc comment mean that if you need authorization don't use this, instead use the other auth feature?
With the current implementation of the PolymorphicAuthDynamicFeature, was there something stopping you from simply using the same registration algorithm used in the AuthDymamicFeature, where the filter registration handle both authentication and authorization.
Without testing anything out, it seems to me that we can use the poly feature for both authentication and authorization. We just need to use the same registration algo used in the AuthDynamicFeature. I'll check out the possibility later, but I'd like to hear what @evnm has to say. Maybe I am missing something.

Thanks for bringing this up, @psamsotha.
My primary concern when putting a469b20 together was to minimize the amount of complexity added to the dropwizard-auth package while adding support for my immediate use case (multi-Principal authentication). dropwizard-auth was already a major source of confusion within Dropwizard, as evidenced by the high proportion of issues and mailing list threads created by users unsure how to use it. I didn't want to make it any worse, so opted to restrict my change to authentication and included a disclaimer stating as such.
This restraint resulted in an obvious deficiency, in terms of rote functionality. Your suggestion points in the direction of a fine solution, but I think that supporting both authentication and authorization for polymorphic Principals could introduce great risk of misconfiguration. In such cases, use of the RolesAllowed annotation would require consumers to be diligent in exhaustively configuring their AuthFilters with Authorizers that enforce the desired role policy. Omission of a AuthFilterBuilder.setAuthorizer() call for a given AuthFilter would result in that filter's Principal type being handled by the default PermitAllAuthorizer, possibly resulting in endpoints being erroneously exposed. In this way, the feature would "fail open" in an undesirable way.
This could be avoided if we could enforce with a compile error the specification of both an authenticator and an authorizer for all AuthFilters passed to PolymorphicAuthDynamicFeature.

Let's take a step back and take a look at how all these components interact. Maybe this will shed some light on how to proceed.
So the components involved with the AuthDynamicFeature don't actually do any authorization. What actually does the authorization, is Jersey's internal RolesAllowedRequestFilter that gets registered in the RolesAllowedDynamicFeature. If you look at the code for the RolesAllowedRequestFilter, you'll see that all it does is get the SecurityContext and call its isUserInRole method.
The SecurityContext gets set up in the AuthFilter, which gets invoked just before the RolesAllowedRequestFilter. After the authentication, the AuthFilter creates a SecurityContext with the Authorizer. The SecurityContext#isUserInRole simply delegates to the Authorizer#authorize method
requestContext.setSecurityContext(new SecurityContext() {
    @Override
    public boolean isUserInRole(String role) {
        return authorizer.authorize(principal.get(), role);
    }
});

So with any AuthFilter, no matter how it's registered, whether directly through Jersey
final BasicCredentialAuthFilter filter
        = new BasicCredentialAuthFilter.Builder<PrincipalOne>()
                .setAuthenticator(authenticatorOne)
                .setAuthorizer(authorizer)
                .buildAuthFilter();
env.jersey().register(filter);
env.jersey().register(RolesAllowedDynamicFeature.class);

Or through the AuthDynamicFeature
final BasicCredentialAuthFilter filter = ...
env.jersey().register(new AuthDynamicFeature(filter));
env.jersey().register(RolesAllowedDynamicFeature.class);

the AuthFilter will set up the SecurityContext properly for the RolesAllowedRequestFilter.
The problem with registering the filter directly through Jersey is that it gets invoked for all resources endpoints. That is why we use the AuthDynamicFeature; so that the feature can determine which endpoints it should be registered with. That's really the only role of the AuthDynamicFeature.
The RolesAllowedDynamicFeature does something similar. It has its registration algorithm to determine which endpoints should get the RolesAllowedRequestFilter registered, based on the authorization annotations. Because of this, if the filter is registered with an endpoint for which we do not have an AuthFilter also registered, then the authorization will fail, as the SecurityContext never gets set up.
All that being said, without changing anything, it is still possible to use the PolymorphicAuthDynamicFeature and still have authorization. The PolymorphicAuthDynamicFeature will register the authentication filter for each endpoint with an @Auth principal parameter
@GET
public Response get(@Auth SomePrincipal principal) {}

If we want authorization on the same endpoint, we can just add a @RolesAllowed annotation, and the RolesAllowedDynamicFeature will automatically register the authz filter for this endpoint.
@GET
@RolesAllowed({ "ADMIN "})
public Response get(@Auth SomePrincipal principal) {}

@evnm Let's try and break down you points of worry.

In such cases, use of the RolesAllowed annotation would require consumers to be diligent in exhaustively configuring their AuthFilters with Authorizers that enforce the desired role policy. Omission of a AuthFilterBuilder.setAuthorizer() call for a given AuthFilter would result in that filter's Principal type being handled by the default PermitAllAuthorizer

As mentioned previously the XAuthDynamicFeature's role is simply to determine which endpoints should get registered an authentication filter. The RolesAllowedDynamicFeature, is what actually registers the authorization filter based on the Roles annotations.. So in the current state, your same worry applies to just using the AuthFilter, with or without an XAuthDynamicFeature. If the user register the RolesAllowedDynamicFeature and doesn't register an Authorizer, then yes, it will use the default PermitAllAuthorizer.
final BasicCredentialAuthFilter filter
        = new BasicCredentialAuthFilter.Builder<PrincipalOne>()
                .setAuthenticator(authenticatorOne)
                //.setAuthorizer(authorizer)  // no authorizer
                .buildAuthFilter();
env.jersey().register(filter);
env.jersey().register(RolesAllowedDynamicFeature.class);

Here is the problem you are worried about. It applies to all cases. It doesn't matter what filter is registered or in what way. If the user fails to register an Authorizer, and they register the RolesAllowedDynamicFeature, then the RolesAllowedRequestFilter will ultimately call the PermitAllAuthorizer. It is up the user to understand this about the architecture in general, not just in regards to using an XAuthDynamicFeature.
Let's look at the point I was making about using the registration algorithm that's used in the AuthDynamicFeature, also for the PolymorphicAuthDynamicFeature. But let's first examine the current implementation of the AuthDynamicFeature and see how it determines which endpoint should get registered the authentication filter
@Override
public void configure(ResourceInfo resourceInfo, FeatureContext context) {
	final AnnotatedMethod am = new AnnotatedMethod(resourceInfo.getResourceMethod());
	final Annotation[][] parameterAnnotations = am.getParameterAnnotations();
	//@DenyAll shouldn't be attached to classes
	final boolean annotationOnClass = (resourceInfo.getResourceClass().getAnnotation(RolesAllowed.class) != null) ||
		(resourceInfo.getResourceClass().getAnnotation(PermitAll.class) != null);
	final boolean annotationOnMethod = am.isAnnotationPresent(RolesAllowed.class) || am.isAnnotationPresent(DenyAll.class) ||
		am.isAnnotationPresent(PermitAll.class);

	if (annotationOnClass || annotationOnMethod) {
		context.register(authFilter);
	} else {
		for (Annotation[] annotations : parameterAnnotations) {
			for (Annotation annotation : annotations) {
				if (annotation instanceof Auth) {
					context.register(authFilter);
					return;
				}
			}
		}
	}
}

So we can see there are two types of checks

Check if the endpoint or it's class has any authorization annotations.
Check if the resource method has an @Auth parameter.

These checks are mutually exclusive, with the authorization annotations taking precedence. This kind of makes sense because when we are using the RolesAllowedDynamicFeature, it will register its authorization filter for all resource/methods annotated with the authorization annotations. So we should make sure to register authentication, attempting to use the same registration algorithm as the RolesAllowedDynamicFeature. This way there is always authentication to set up the SecurityContext for the Jersey filter to call.
If there are no authorization annotations, then just having an @Auth parameter is enough to register the authentication filter. In this case, whether or not we use the RolesAllowedDynamicFeature doesn't matter, as the RolesAllowedDynamicFeature on registers authorization when authorization annotations are present.
But the @Auth annotation isn't the only we to enable authentication. We can simply annotate classes/methods with @PermitAll. This also kind of makes sense. Just because we have authentication doesn't always mean we need access to the principal. So with @PermitAll, whether or not we have an @Auth parameter, there is authentication.
Now with all that said, how does this effect the PolymorphicAuthDynamicFeature?
Well for one, I don't think it's feasible to allow the case of just using @PermitAll by itself. There's no way to determine which filter should get registered. Actually this is the case for all authorization annotations.
So that brings us to the point of how do we sync the registration of the authentication filter with the registration of the authorization filter by the RolesAllowedDynamicFeature, just like the AuthDynamicFeature does?
Well now that I think about it, I don't see how it's possible. The AuthDynamicFeature doesn't take the @Auth annotation into consideration, when registering by looking for authorization annotations. Remember I said they are mutually exclusive in the current implementation. With the poly feature we would need to somehow combine these two checks. And I'm not sure it really makes much sense to do so, or may add way too much complexity.
I guess sometimes you need to write your thoughts down to disprove your own theories :-)
So I guess that still leave us with the main problem about how do we get authorization with the poly feature? As mentioned above, just adding the authorization annotations on the resource method, along with using the RolesAllowedDynamicFeature is enough.
I guess for now we should just document how it could/should be done. I propose maybe something along the lines of

To use authorization with the PolymorphicAuthDynamicFeature, you need to register the RolesAllowedDynamicFeature with Jersey/DropWizard. Unlike when using the AuthDynamicFeature, where authorization annotations are allowed on classes, only methods (with corresponding @Auth principal parameters) should be annotated with @RolesAllowed

@GET
@RolesAllowed({ "ADMIN" })
public Response get(@Auth MyPrincipal principal) {}

The PolymorphicAuthDynamicFeature MUST NOT be used with the AuthDynamicFeature. Only one should be used. Using both will cause undesired behavior.

Along with the basic usage of the PolymorphicAuthDynamicFeature in the documentation, I think the above should give users enough information to get started.
All of this is up for discussion. All the above provided information is to help others get a better picture of what's going on. If we're in agreement that the current implementation should just be left alone, and just documented, I guess all that's left is to document the poly feature.
I've provided a complete test case in this gist. Nothing is modified. Simply adding the authorization annotation along with the RolesAllowedDynamicFeature is enough to get it working correctly.

Thanks for taking the time to write your thought process in such detail. I think we're in agreement as to the behavior of the components in question.
I'm in favor of documenting the subtleties of the existing implementation rather than trying to augment it to cover additional use cases. Especially without any open issues indicating taht additional functionality is required by users.
Since you've put in so much effort already, would you like to put a change together adding to the Javadoc of PolymorphicAuthDynamicFeature? I'd be happy to review a PR if you'd like to move the discussion to one.

@evnm I ended up just adding a section in the main documentation. Seems more fitting there. Also removed the sentence in the javadoc about using the AuthDynamicFeature

Resolved with #1637


Expose services in a single HomeKit  accessory for multiple services accessories like Flood/Smoke Sensor

Hello,
Would it be possible to group services in a single accessory with multiple switches?
I think we could publish multiple services into an accessory with HomeKit to do that :

For exemple, I own a multi-switch device 'Greenwave PowerNode'.

I noticed a 'parentId' variable so we just have to group published services by parentId number.
{
    "id": 62,
    "name": "Multiprise P6 PC",
    "roomID": 221,
    "type": "com.fibaro.binarySwitch",
    "baseType": "com.fibaro.actor",
    "enabled": true,
    "visible": true,
    "isPlugin": false,
    "parentId": 43,
    "remoteGatewayId": 0,
    "interfaces": [
        "deviceGrouping",
        "energy",
        "power",
        "zwave",
        "zwaveProtection"
    ],
    "properties": {
        "parameters": [
            {
                "id": 2,
                "lastReportedValue": 129,
                "lastSetValue": 129,
                "size": 1,
                "value": 129
            }
        ],
        "pollingTimeSec": 0,
        "zwaveCompany": "GreenWave Reality Inc.",
        "zwaveInfo": "3,3,41",
        "zwaveVersion": "4.27",
        "RFProtectionState": "0",
        "RFProtectionSupport": "0",
        "categories": "[\"multimedia\"]",
        "configured": true,
        "dead": "false",
        "deadReason": "",
        "deviceControlType": "12",
        "deviceGroup": "[]",
        "deviceGroupMaster": "0",
        "deviceIcon": "10",
        "emailNotificationID": "0",
        "emailNotificationType": "0",
        "endPointId": "1",
        "energy": "0.41",
        "localProtectionState": "0",
        "localProtectionSupport": "0",
        "log": "",
        "logTemp": "",
        "manufacturer": "",
        "markAsDead": "true",
        "model": "",
        "nodeId": "7",
        "parametersTemplate": "315",
        "power": "40.30",
        "productInfo": "0,153,0,3,0,4,4,27",
        "protectionExclusiveControl": "0",
        "protectionExclusiveControlSupport": "false",
        "protectionState": "0",
        "protectionTimeout": "0",
        "protectionTimeoutSupport": "false",
        "pushNotificationID": "0",
        "pushNotificationType": "0",
        "remoteGatewayId": "0",
        "saveLogs": "true",
        "serialNumber": "",
        "showEnergy": "true",
        "smsNotificationID": "0",
        "smsNotificationType": "0",
        "useTemplate": "false",
        "userDescription": "",
        "value": "true"
    },
    "actions": {
        "reconfigure": 0,
        "reset": 0,
        "turnOff": 0,
        "turnOn": 0
    },
    "created":<PHONE_NUMBER>,
    "modified":<PHONE_NUMBER>,
    "sortOrder": 14
}

Does this seem possible?
Regards
Ludovic

This is working for Philips Hue devices like Philips Hue motion sensor which is also have additionnal services (Temp and Light sensors).
This would be possible to group together the services presented by Fibaro accessories. For example :
Fibaro FGFS-101-ZW5 "Flood Sensor"

Smoke Sensor
Temp sensor

Fibaro FGSD "Smoke Sensor"

Smoke Sensor
Temp sensor

Regards
Ludovic

Maybe there is a link with this already existing piece of code checking for device.parentId:
https://github.com/ilcato/homebridge-fibaro-home-center/blob/d4a25f2d881222233efb9af326645befaf827901/src/platform.ts#L247
  findSiblingDevices(device, devices) {
    const siblings = new Map<string, unknown>();

    devices.map((s) => {
      if (s.visible === true && s.name.charAt(0) !== '_') {
        if (device.parentId === s.parentId && device.id !== s.id) {
          siblings.set(s.type, s);
        }
      }
    });

    return siblings;
  }

I think I understood my device is not recognized as multi-service. Indeed the current implementation is based on the name of the device and not the identifier of the parent device.
But my slave devices has not the same name, so it fails.
https://github.com/ilcato/homebridge-fibaro-home-center/blob/d4a25f2d881222233efb9af326645befaf827901/src/platform.ts#L202
Is there a reason not to use the parentId variable instead?

When I set the same name to slave devices, I am getting errors from the log console as you can see below:
[18/12/2021, 22:59:33] [Fibaro-Testing] Getting value from device:  171  parameter: Current Temperature
[18/12/2021, 22:59:33] [Fibaro-Testing] Getting value from device:  170  parameter: Smoke Detected
[18/12/2021, 22:59:33] [Fibaro-Testing] Getting value from device:  170  parameter: Battery Level
[18/12/2021, 22:59:33] [Fibaro-Testing] Getting value from device:  170  parameter: Battery Level
(node:21239) UnhandledPromiseRejectionWarning: Error: This callback function has already been called by someone else; it can only be called one time.
    at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:6:13
    at FibaroAccessory.getCharacteristicValue (/usr/lib/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:440:9)
    at BatteryLevel.<anonymous> (/usr/lib/node_modules/homebridge-fibaro-home-center/src/fibaroAccessory.ts:331:16)
    at BatteryLevel.emit (events.js:412:35)
    at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1544:14
    at new Promise (<anonymous>)
    at BatteryLevel.<anonymous> (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1542:12)
    at step (/usr/lib/node_modules/homebridge/node_modules/tslib/tslib.js:143:27)
    at Object.next (/usr/lib/node_modules/homebridge/node_modules/tslib/tslib.js:124:57)
    at /usr/lib/node_modules/homebridge/node_modules/tslib/tslib.js:117:75
(node:21239) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 40)


Fixed issue with read after write

per the open group documentation (here):

When a file is opened with update mode ('+' as the second or third character in the mode argument), both input and output may be performed on the associated stream. However, the application shall ensure that output is not directly followed by input without an intervening call to fflush() or to a file positioning function (fseek(), fsetpos(), or rewind()).

Unfortunately, the example has an ftell between a read and a write, which will cause the data to be flushed on GCG + IAR, but not on ARMCC.
should resolve https://github.com/ARMmbed/mbed-os-example-filesystem/issues/16
cc @kegilbert, @cmonr

@geky @kegilbert Can we please get this merged today as it will be needed for rc2


Default ladder is now a unknown node

also /giveme default:ladder_wood ends up with a error message.
https://github.com/minetest-mods/ropes/blob/c69b6fb0e455a465104ee8974f93f3c666e080b0/extendingladder.lua#L6
Is the removing of default:ladder_wood|steel necessary? There might be other mods that depend on it.

The goal I was going for was to "upgrade" ladders in existing worlds with new features. The main problem I ran into was that default ladders are wallmounted and I wanted to make them facedir, which has a different set of interpretations for the param2 variable.  So simply changing the existing default:ladder definition would result in existing ladder nodes winding up with wonky orientations. I needed the nodes to have distinct names for the wallmounted<->facedir update code to know what to do to param2.
I'll take another look at how I can accomplish this. I think the best approach might be to add a set of options for whether to replace existing ladders or not, with the default being not to replace. I'm on vacation right now so don't have access to my dev computer, but I'll be home in a few days and it should be a relatively simple fix. Main complexity will probably be dealing with crating recipes in the event that both ladder types are allowed to be built in the same game.

I've made the replacement of default ladders an option in the mod's settings that is off by default.


ref(scripts/coverage): simplify test coverage with coverpkg

Closing because circleci can't handle the memory requirements


Adding third user to the Chat with Direct line

Hi,
I was trying to generate a conversation which initially it will start with a bot and default user once this default user requests to talk with another user this will join this third user, and they will be able talk between them, right now I already achieved to read the conversation in the third user chat, bad when I try to send a message via Direct line in that specific conversation it is not shown in the initial user chat.
Do you know if there is any way to achieve this? I am sending this message in the following way using c#.
How can this third user get into the conversation?
DirectLineClient client = new DirectLineClient(directLineSecret);

var conversationId = "XXXXXXXXXXX";

new System.Threading.Thread(async () => await ReadBotMessagesAsync(client,conversationId)).Start();

Activity userMessage = new Activity
                        {
                            From = new ChannelAccount("User09090", "User User"),
                            Text = "Hello everyone!",
                            Type = ActivityTypes.Message
                    };

  await client.Conversations.PostActivityAsync(conversationId, userMessage);

Thank you in advance guys.

Hi @jrom20, this should work, although it hasn't been tested very thoroughly -- we're focused on the single-user scenario at the moment.
Can you send an example conversation ID and I can take a look?

@dandriscoll  I'm already able to join a third user that specific conversationId, and reply into it. but in the first user side I can't let him know that there is another user, if I were able to know into the first user chat side that there is third user I would change the replying  program. otherwise I noticed that the third user get into the current initial user dialog, there is any option to stop the dialog? I'm doing this right now, and it shows the following error, "Sorry, my bot code is having an issue."
Steps:
First I start a conversation between Bot and User1, and User1 enter into the default Dialog (Using LUIS),
await Conversation.SendAsync(activity, () => new IniatialDialog());
When a third user get into the conversation I close the current dialog or user state doing this:
activity.GetStateClient().BotState.DeleteStateForUser(activity.ChannelId, activity.From.Id);
I'm doing this because third user was getting into the default dialog, and I don't want that, so I created a new Dialog to save the new third user Id in ConversationData, and then I start a new dialog.
await Conversation.SendAsync(activity, () => new UserToUserDialog());
But It shows the below error that I mentioned.
Conversation Id FA92v5iMfuw3HMm0ekRsTp.

@dandriscoll could you please take a look and see if you find something odd here? Thx :)

@jrom20 Closing this for inactivity, please continue the conversation if you would like to reopen we can always do that as well.


Ensure an eval() in render.js won't throw

This is a hacky attempt to fix #188.
I'm actually not sure if there is a (reasonable) regex that will work for all possible snippets, since e.g. someone could define a function draw() {} within a closure that doesn't get added to the local scope... I'd rather just use a library like esprima to walk the AST of the snippet and specifically pick out the top-level functions we need, but esprima isn't exactly a small library and it seems the reference pages are already a bit slow to load in some places, so I don't want to add to that.
Another more long-term option might be to actually run each sketch in its own iframe, though that could get expensive on pages with lots of examples...
So, just doing an eval('typeof ' + f) seemed to be the most lightweight solution that'd ensure the sort of "false positives" found in #188 wouldn't break the page. :disappointed:

Oh, although that said, one cool thing esprima integration could do for snippets is automatically hyperlink p5 function and variable names to their reference pages on the website!! That would be SO cool.

:)


App won't render screens on Safari and mobile browsers when using canvas_text flag

The app editor won't load since we are using this skia flag: --dart-define=FLUTTER_WEB_USE_EXPERIMENTAL_CANVAS_TEXT=true
Here's a video with more details: https://firebasestorage.googleapis.com/v0/b/ampstor.appspot.com/o/Screen Recording 2020-05-13 at 9.46.45 AM.mov?alt=media&token=3f909238-57fc-41f4-afd8-60828d74c151
The same issue is happening when we open the app on a mobile browser as well. It cannot be reproduced on Chrome-based browsers, such as Firefox or Edge.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.18.0-13.0.pre, on Mac OS X 10.15.4 19E287, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.45.0)
[✓] Connected device (4 available)
• No issues found!
Console logs:
[Error] XMLHttpRequest cannot load https://firestore.googleapis.com/google.firestore.v1.Firestore/Listen/channel?database=projects%2Fampstor%2Fdatabases%2F(default)&gsessionid=TAqSbmV_1OoG8725ssOp1f5HXQw1JVhSJY1hRX36Al8&VER=8&RID=rpc&SID=2IOeIVyZTyuMit_ClNWrwA&CI=0&AID=66&TYPE=xmlhttp&zx=vi1um2nt6gea&t=2 due to access control checks.
	(anonymous function) (firebase-firestore.js:1:39523)
	Pe (firebase-firestore.js:1:20293)
	Le (firebase-firestore.js:1:19988)
	(anonymous function) (firebase-firestore.js:1:41625)
	(anonymous function)
	(anonymous function) (firebase-firestore.js:1:18997)
[Error] XMLHttpRequest cannot load https://firestore.googleapis.com/google.firestore.v1.Firestore/Write/channel?database=projects%2Fampstor%2Fdatabases%2F(default)&gsessionid=k9t0nI773xTSYCnQLDvP3Vl0tvMmjYMou7vth5eqX5Y&VER=8&RID=rpc&SID=IxMmPc6AZjZc4nUK4q_1Pg&CI=0&AID=3&TYPE=xmlhttp&zx=380e07b08ahf&t=2 due to access control checks.
	(anonymous function) (firebase-firestore.js:1:39523)
	Pe (firebase-firestore.js:1:20293)
	Le (firebase-firestore.js:1:19988)
	(anonymous function) (firebase-firestore.js:1:41625)
	(anonymous function)
	(anonymous function) (firebase-firestore.js:1:18997)
[Error] Unhandled Promise Rejection: TypeError: FirebaseError: Messaging: This browser doesn't support the API's required to use the firebase SDK. (messaging/unsupported-browser).
	(anonymous function)
	rejectPromise

@mariamhas @ferhatb you can close this issue. We found the bug. It is Firebase cloud messaging that is not supported on Safari: https://firebase.google.com/support/guides/environments_js-sdk
Sorry for the confusion.


html sanitizer should not trim whitespace from data-* attributes

Say I sanitize the string ''. The html sanitizer will trim the whitespace, resulting in invalid latex ''.

This issue is being closed as a preparation step before archiving the repository.  See the README for more detail.


[BEAM-9615] Generate Go Schema Protos

Update the Go SDK protos, in particular, include the schema protos in them.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

R: @youngoli @tysonjh

Run Go PostCommit


how to test my own smart contract ?

I had run benchmark simple test with caliper.
Now i want to test my smart contract, it does some auditing work for one column of data, if auditing passed. then broadcast to the network, just a simulation, not on a real network.
My question is: which file should I modify?

I see the path(./src/contract/fabric/simple) has go version and node.js version smart contract, may i edit one of them, modify the function content in the above file and config file in the path(./benchmark/simple/),then run command( node ./benchmark/simple main.js)?
thanks a lot

@houqinghui
thank you, I think I may solve the above problem, but only 4 clients run benchmark(i see client number 5 is defined in the file ./benchmark/simple/config.yaml, the document mentioned 1 is for sorting, and 4 is peer client), I modify the 5 to 9 to test 8 clients but it doesn't work...
If I want to test 8 or even 32 clients, what should I do?

@lybyyy   there are 5 clients , 1 orderer for sorting and 4 peer in the default config.yaml. if you want to define more peers, you should do the steps below.
a.	Before the test, you should regenerate the artifacts based on the network topology, for example certificates and private key.
b.	Modify the docker-compose.yaml according to your network topology, which can start the docker containers of the blockchain nodes.
c.	Modify the fabric network configuration file according to your fabric network, furthermore you can define your own chaincode to test your network.
d.	Run caliper to test your blockchain network.

Since it was resolved, it is closing.


Add amendments to Motion-PDF-Summary-Box

Adds amendments to motion pdf summary box.
Adds a new flatMap function to array.prototype (should be safe to use until
Array.flatMap made it into official JS. I expect it in ES 2019.
Refactors some PDF and ChangeReco / Amendment related code

see #4746


Fix connected nodes metric

Already verified in a small duration test that the gauge value updates when a node is taken down.

Added a commit to change the default threshold latency in Timer metrics and improve the RE-PREPARE error log message.


Minor comment change in gulpfile

Checking that I can't push to master without a PR

Looks good

All good


Add --original option to osxphotos timewarp

Photos stores the original date time of the photo and shows this in the info > adjust date/time dialog. However, it does not have a "revert to original" option to adjust the date time back. Add a --original option that runs first and adjusts the date/time to the original. See this Reddit post for context.

Looks like this is in ZEXTENDEDATTRIBUTES.ZDATECREATED. ZEXTENDEDATTRIBUTES is stored in the PhotoInfo.exif which returns an ExifInfo object but this does not currently store the creation date. The data is all read by PhotosDB though and stored in _db_exifinfo_uuid.

The ZDATECREATED column wasn't added to ZEXTENDEDATTRIBUTES until Ventura so this will be a Ventura+ feature.


[Bug]: ORCID search + manually additing don't work together

Contact Details
<EMAIL_ADDRESS>What happened?
Contacts:
If I search for a person via ORCID, confirm the person and then want to add further information  (such as email, affiliation...), all the information from the ORCID search is gone.
Steps to reproduce:

Search for person via ORCID, e.g. 0009-0000-4569-6126
Add email/affiliation etc.
First and last name are gone

What did you expect?
No response
Host
Applies to All
Host Details
Windows 11
ARCitect v 0.0.50
Swate version
v1.0.0-beta.18

Found the issue and fixed it! Will be live with the next release!


Added Windows 7

I tested the script on Windows 7, Service Pack 1, Build 7601. Worked Flawlessly

Thanks for the PR :)


Sketch integration with Casbin

Perhaps a CasbinAccessPolicy, relying on a Casbin server to manage access rules, would be a good solution for use cases (like AIMM) where there isn't an existing data access rule system.

Also of interest:

@dylanmcreynolds' write-up of authorization schemes
https://github.com/pycasbin/fastapi-authz


clang-tidy brace readability improvements

This was picked up by PX4's build system in https://github.com/PX4/Firmware/pull/7685. We've found little bugs can slip through unnoticed with one liners so we require braces.
Feel free to ignore this PR if you don't agree.

@VicenteEprosima This file has formatting inconsistencies as well (4 space and 8 space indents)

Thanks for the feedback!


Update JupyterCon banner to just link to conference site

Delete the reference to the call for proposals now it is over.

CC @SylvainCorlay for review

Thanks @choldgraf!


a11y - dialog closes silently when opened from a menu component

Bug, feature request, or proposal:
Bug verified on chromevox next and voiceover.
What is the expected behavior?
Given a page with a button.  The button opens a menu component.  A button in the menu component opens a dialog.
When a dialog closes, the screen reader should read "exited dialog" (or similar) and return focus at the last focusable element used.
What is the current behavior?
Given a page with a button.  The button opens a menu component.  A button in the menu component opens a dialog.
When the dialog closes, the screen reader reads nothing.  If the user hits tab, they navigate to the next tabindex after the button that spawns the menu.
Note that shift tab after closing the dialog sets focus to the expected location, calls out "exited dialog", and reads the label of the button.
What are the steps to reproduce?
See details in plnkr link: http://plnkr.co/edit/76CdtijrwVxeEnBhc9Z2
A workaround is included, but it becomes rather cumbersome when there's a menu for each element in a repeated field.
What is the use-case or motivation for changing an existing behavior?
Users who depend on screen readers can easily lose context of where they are when closing dialogs, especially if esc is pressed because there is no notification that the dialog is gone and no notification that the focus changed.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 5.0.4-303e004
Is there anything else we should know?

Duplicate of #17962


Synchronize across time zones question

Is there a way to set the start time so that 'Synchronize across time zones' check box is not checked when creating new trigger? I want to create a weekly trigger that starts a process every day at 7:00pm local time (central time). I created weekly trigger and set Trigger.StartBoundary to 7pm local time. Prior to DST change, it was working correctly and starting process at 7pm local time. After DST change, it's firing up the process 1hour later (8pm local time). I suspect it's due to 'Synchronize across time zones' check box. If there is no way to change 'Synchronize across time zones' check box through code, should I be using UTC time for Trigger.StartBoundary? Would that take care of the DST problem?
Thanks in advance!
Originally posted: 2012-04-25T12:19:39

Checking the "Synchronize..." check box will force an "Unspecified" DateTime value to a UTC value. If the DateTime value is either "Local" or "UTC", then it should be checked already. Setting the StartBoundary to a DateTime with Kind = "Unspecified" will leave the checkbox unchecked.
I am not aware of anything in the library that specifically handles DST. I would try using UTC and see. Unfortunately, this is something handled by the native library and this wrapper has no control over that.
Originally posted: 2012-04-25T16:05:05

Thanks for the reply. I tried using UTC time and noticed something interesting when I try to export a task. If I use UTC, the StartBoundary in XML file when I manually export the task is in the format 'Z'. If I use local time, then it's in the format of '+-'. It seems like the  can be different based on whether the local time zone is in DST or not. I think that's what causing the start time of the task to be off by 1hour. Using UTC should work better I think.
Originally posted: 2012-04-27T07:07:16