What if the code found in github with MIT license was stolen by someone and uploaded there?

What would happen if a piece of code from a proprietary source was uploaded by someone without permission to github with the MIT license and thousands of people have used it. Even if the company who owns the code requests github to drop the repository, what would prevent the endless spread of the code by users believing it to have MIT license.

String temporary uploaded file to HTTP Session before saving to MySQL Database

I have a question about file upload using Java and Spring MVC.

the original implementation of upload a file is to temporarily store the file in local disk before uploading to MySQL Database, now we want to change. We store this uploaded file to HTTP Session instead of the local file system before saving to MySQL Database. below is my implementation for this approach. Can you guys help me if this is the correct way of my idea?

enter code here@POST enter code here@Path(“/upload”) enter code here@Consumes(MediaType.MULTIPART_FORM_DATA) enter code herepublic Bundle uploadToHttpSession(@FormDataParam(“file”) enter code hereInputStream file, enter code here @FormDataParam(“file”) FormDataContentDisposition enter code herefileInfo, HttpServletRequest request) { enter code here if (fileInfo == null) { enter code here throw new BadRequestException(“Missing enter code hereFormDataContentDisposition”); enter code here }

enter code here String fileName = fileInfo.getFileName(); enter code here if (StringUtils.isBlank(fileName)) { enter code here throw new enter code hereBadRequestException(“FormDataContentDisposition cannot be null or enter code hereempty”); enter code here } enter code here byte[] bytes = mBundleUtil.getByteArray(file);

`enter code here`Bundle bundle = createBundle(bytes, fileInfo);  `enter code here`checkForConflict(bundle); 

enter code here if (bundle.getBundleType().equals(BundleType.ASSAY)) { enter code here List assayNames = bundle.getAssayNames(); enter code here for (String assayName : assayNames) { enter code here if (!mBundleService.assayExists(assayName)) { enter code here throw new enter code hereBadRequestException(ErrorCode.UNKNOWN_ASSAY.createBadRequest(assayNameenter code here)); enter code here } enter code here } enter code here } enter code hereBundleFile bundleFile = enter code heremBundleService.createBundleFileBlob(bytes); bundle.setBundleFile(bundleFile);

String sha1Checksum = mBundleUtil.getChecksum(bytes); bundle.setChecksum(sha1Checksum);  // store file into Http Session HttpSession httpSession = request.getSession(); httpSession.setAttribute("bundle", bundle); return bundle; 


@POST @Produces(MediaType.APPLICATION_JSON) public Bundle addToDatabase(HttpServletRequest request) {

HttpSession httpSession = request.getSession(false); if (httpSession != null) {   Bundle bundle = (Bundle) httpSession.getAttribute("bundle");    bundle.setId(null);   bundle.setBundleStatus(BundleStatus.PENDING);   bundle.setStatusSetByUser(getCurrentUser());    Bundle savedBundle = mBundleService.add(bundle);    return savedBundle; } return null; 


Apple “pre-scans” all your files before them being uploaded to iCloud?

I don’t know if this community has been aware of this latest development by Apple.

Please read the news here:

Apple Now Scans Uploaded Content for Child Abuse Imagery

So apparently, all the common understandings about Apple’s approach towards encrypting communication data were false because Apple only start to encrypt all i-devices data once your uploads were met by certain rules of Apple. Technically, they cannot scan which materials were legitimate without reviewing the full content of all i-devices first, which bears the question was this the latest policy just being introduced or had been implemented for years without explicitly being transparent to the public. (Being strict with the law is one thing, but where’s the full transparency report on this?)

If this development were true, could one also assume all data stored on iCloud were in fact duplicated by Apple for information-miming purpose? All the data were supposed to be permanently deleted or erased by Apple were being kept indefinitely without the consent of the client? To be more precise, does Apple even obey the rules of GDPR since all your information were being sent to California’s data centre where iCloud’s serves are based? Even according US law, could they keep all your usage data from Safari, Notes, Photos, Books…on the i-Devices indefinitely as long as they want even if you had decided to erase and exit Apple’s universe and switch to Android devices…?

Even creepier, is Apple “pre-scanning” and “collecting” all data of Apple’s users across the world? This sounds worse than a plot from the “Minority Report”. Should iCloud still be trusted if you are data safety nerd?

This policy was updated in Apple’s privacy policy on 9 May 2019, is this a new thing or year-long practice known in the industry?

Magento 2 Color Attribute: How to make the size of uploaded swatches match the default ones?

For our site’s color attribute, we would like to use both the default color options and a few uploaded swatches. However, the uploaded swatches are showing up much smaller, with a white border around them that the default colors don’t have. I have tried using different sized images but it didn’t help.

The attribute is just for search results navigation on the sidebar, it is not part of a configurable product or anything complex. I’m hoping this can be solved without coding because I’m not the programmer.


Drupal 8 uploaded should be stored in certain s3 bucket

Currently im facing issue while uploading the file My code is

by hook_entity_presave im fetching file tid

`$ file_tid=$ entity->get(‘field_photos_photos’)->getValue()[0][‘target_id’];

if(!empty($ file_tid)){

$ uploaded_file_uri= \Drupal::entityTypeManager()->getStorage(‘file’)->load($ file_tid)->getFileUri();

} `

I couldnt get the file tid .

Images not being uploaded to defined Image Style folder on server

Drupal 7 site. For over 5 years we’ve had no trouble uploading images to view with a blog. This weekend we had Ningx loaded on our server. Hosting co. is certain that’s not issue. Maybe it isn’t. But…

What is happening is when we upload File Type of Image it now puts it in “/files” folder. Not the subfolder under it: “files/styles/wnhs870x325/public” designated by the Image Style. If I manually copy the file over to subfolder image displays correctly.

Any ideas why the image is uploading to one location but looking for it in another.

Thanks -Neil