Appending log data in shared sharepoint file with write-only permissions?

I need to write live log data, in line-by-line csv format, to a file in Sharepoint. Ideally, my permissions will be to only append/write, and not read.

Very simple: Date, time, plain text columns C,D,E. No blobs or binary stuff, one line at a time, low volume, perhaps less than once every 5 minutes.

Previously, I was using Google Sheets and the node library, but they’ve moved to Sharepoint and it’s all a bit new to me.

Ideally, it would be appending a line to a shared Excel spreadsheet, but if it has to be a plain text (or better?) format, the so be it.

As long as I can post the data and not store it my end (data compliance), that’s all they need.

I’ve read some docs, looked here on StackExchange, but I can only find things to write or create, not append.

Any help appreciated.

Downloading and appending data from AWS S3 whilst avoiding clashes

I have to upload a TSV file to an S3 bucket, the content is form submission data. Another service will consume and do things with this data as soon as possible. The service would like one large file that is appended with each new form submission.

My simple approach is submit –> download data –> append –> upload.

The problem being two people submitting at the same time and data being lost.

Is there a sane and straight forward way of avoiding this? Batch processing of single files is out of the question as the data needs to be used straight away. I was considering inserting into a SQL Server table, and then exporting the TSV on each new row via a trigger. Apparently this is a bad idea and a service broker should be used instead but I don’t know anything about this.

The approach needs to be .NET C# and I cannot avoid needing to upload a TSV file of form data. Perhaps there is something I can do within .NET itself?

Any suggestions are welcome, thanks.

angular-ui-router appending #app

We have a bug in our AngularJS application.

We’re using ui-router to handle our state changes, but the ui-router keeps appending #app to the URL, whenever the user navigates the page using his browser navigation (back, forward). As a result navigating like that takes the user two clicks per action to get to the new subpage.

The browser history looks like so

http://localhost:8080/app/#/modulename
http://localhost:8080/app/#/modulename#app <- unnecessary step
http://localhost:8080/app/#/anothermodule
http://localhost:8080/app/#/anothermodule#app <-unnecessary step

and so on…

Maybe there’s something wrong with this, which is causing the bug in question.

$  stateProvider                 .state('app', {                     abstract: true,                     url: '/',                     // parent: true,                     templateUrl: CONFIG.baseUrl + '/js/modules/Core/View/app.html',                 })                 .state('access.404', {                     url: '/404',                     templateUrl: 'tpl/page_404.html'                 }); 

AngularJS version: 1.2.29

ui-router version: 0.2.10

Appending a new option to an existing full contextMenu

I’m creating a chrome extension that adds functionality to gmail when right clicking on threads.

The issue is that the chrome context menu for threads is already at capacity (6). However they have added more by creating child contextItems for each section, and so that’s my plan as well.

I have tried to add to one of those sections however I can’t figure out what the parent ID is. I have inspected the context menu but each item has a unique ID and while they have naming conventions I don’t see a parent ID I can use.

chrome.contextMenus.create({“title”: ‘testbutton’, “contexts”:[‘all’],”parentId”:??,”id”: “1”})

hoping to have an additional option of ‘testbutton’ right above the existing ‘move to tab’ option.

Appending new lines in Tomcat Catalina log rotate

Application running on Tomcat is using log4j for some unknown reason is appending (randomly) new log lines somewhere in the middle of the log file

log4j.properites looks like:

log4j.rootLogger=INFO, CATALINA log4j.appender.CATALINA=org.apache.log4j.rolling.RollingFileAppender log4j.appender.CATALINA.RollingPolicy=org.apache.log4j.rolling.TimeBasedRollingPolicy log4j.appender.CATALINA.RollingPolicy.FileNamePattern=$  {catalina.base}/logs/catalina.%d{yyyy-MM-dd}.log log4j.appender.CATALINA.layout=com.medallies.log.ThreadIdSupportedPatternLayout log4j.appender.CATALINA.layout.ConversionPattern=[TID=%i] %-5p %d{HH:mm:ss,SSS} | %c | %m%n 

Tomcat restart will help in that case but after some time issue will come back.

Any thought on that?

Appending a secret (pepper) to Argon2 password hashes

I’ve read quite a bit of the StackExchange and HackerNews debates on the user of “peppers” in password hash security. There are a number of different implementations of the idea of a pepper, ranging from an additional hardcoded salt in the code hash(password, pepper, salt), to encrypting each password hash separately, in which case the secret key is the pepper.

In the case of one of the middle ground approaches, a shared and secret pepper is included via hash(hmac(password, pepper),salt). This is necessary primarily because of many hashing algorithm’s reliance on the Merkle–Damgård construction which is vulnerable to length extension attacks.

However, Argon2 is not based on a Merkle–Damgård construction and therefore this attack would not apply. In using Argon2, can the naive approach of argon2(password, pepper, salt) be used?

Additionally, the Argon2 specification Introduction seems to indicate that using HMACs, peppers, or secret keys at all is unnecessary. Is Argon2ID with strong memory, threads, and time costs enough on its own?

API Changes to Paragraph Module Stop Appending Paragraphs to Existing Nodes

I know there are posts out there talking about adding a paragraph to a node programmatically but it also appears the API changed and I cannot reconcile the two.

I am using the following code.

       foreach ($  item['commodities'] as $  commodity_id => $  commodity) {         $  commodity_price_save = $  commodity['commodity_price'];          //Store Commodity values in Paragraph content         $  paragraph = Paragraph::create([             'type' => 'commodity_name_and_price',             'field_commodity_namep' => $  commodity['commodity_name'],             'field_commodity_pricep' =>$  commodity_price_save,         ]);          $  paragraph->save();          //$  this->_log('Target ID $  paragraph->id(): ' . $  paragraph->id());         //$  this->_log('Target Revision ID $  paragraph->getRevisionId(): ' . $  paragraph->getRevisionId());          $  nid  = $  node->nid;         $  node_apend = Node::load($  nid);          $  node_apend->field_commodity_name_and_pricep[] = [             'target_id' => $  paragraph->Id(),             'target_revision_id' => $  paragraph->getRevisionId(),         ];          $  node_apend->save();      }] 

I get the following error messages when running this code as part of a custom module running during drush.

[warning] call_user_func() expects parameter 1 to be a valid callback, class ‘Drupal\paragraphs\Entity\Paragraph’ does not have a method ‘getCurrentUserId’ BaseFieldDefinition.php:469

[warning] array_flip(): Can only flip STRING and INTEGER values! EntityStorageBase.php:264

[error] Object of class Drupal\Core\Field\FieldItemList could not be converted to string EntityStorageBase.php:131

[error] E_RECOVERABLE_ERROR encountered; aborting. To ignore recoverable errors, run again with –no-halt-on-error

Any help is greatly appreciated!

Thanks, Josh

Appending large length encoded in DER to custom recovery

I want to install custom recovery with locked bootloader by exploiting some bugs following this guide https://forum.xda-developers.com/xiaomi-redmi-5a/how-to/bypass-bootloader-lock-redmi-5ariva-t3772381

One of the step in guide says that I have to append a 4k block which begins with 0x30, 0x83, 0x19, 0x89, 0x64 to twrp-3.2.1-0-riva.img but how to append?

I tried editing the file using hex editor and i dont know what to do next