Skip to content

Fineract 853#749

Closed
DBryzz wants to merge 1 commit intoapache:developfrom
DBryzz:FINERACT-853
Closed

Fineract 853#749
DBryzz wants to merge 1 commit intoapache:developfrom
DBryzz:FINERACT-853

Conversation

@DBryzz
Copy link

@DBryzz DBryzz commented Mar 31, 2020

Description

Added spotbugsplugin "com.h3xstream.findsecbugs:findsecbugs-plugin:1.8.0" to dependencies.gradle and dev-dependencies.gradle.
To fix issue ## FINERACT-853

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

@DBryzz
Copy link
Author

DBryzz commented Mar 31, 2020

Hello @vorburger

Can you review my PR and correct it

@thesmallstar
Copy link
Member

thesmallstar commented Mar 31, 2020

@DBryzz hello, can you please change the commit messege? It is recommended that the commit messege starts with issue number 😃

Edit: The build is failing, you can run
./gradlew clean build
to ensure the build passes locally.

@xurror
Copy link
Contributor

xurror commented Apr 1, 2020

Also, 2 commit messages for 1 PR does not look good in the commit history. So i suggests you squash your commit messages into a single message and don't forget to apply @thesmallstar comment.

@DBryzz
Copy link
Author

DBryzz commented Apr 1, 2020 via email

@percyashu
Copy link
Contributor

@DBryzz try adding

spotbugsMain.maxHeapSize = '2g'

To the build.gradle and fix the violation that come up.

@DBryzz DBryzz force-pushed the FINERACT-853 branch 3 times, most recently from 1f541aa to 9125c62 Compare April 10, 2020 16:39
@apache apache deleted a comment from DBryzz Apr 10, 2020
Copy link
Member

@vorburger vorburger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix the violation that come up.

@DBryzz as @awasum points out, this PR can obviously only be merged if it doesn't fail the build (which it currently does, so NOK), hope this makes sense?

I just looked at it a bit more closely (the logs are currently not available on travis-ci.org due to "There was an error while trying to fetch the log.", so I pulled and ran it locally), and noticed FINERACT-879 ... I've also left a related comment in FINERACT-853.

@DBryzz
Copy link
Author

DBryzz commented Apr 13, 2020

Greetings

Thanks for your review and comments @vorburger. I will try to find out why CORS is the only violation findsecbug detects.

Regarding the Overly permissive CORS policy, I located the file and the violation is due to the line response.setHeader("Access-Control-Allow-Origin", "*"); in class org.apache.fineract.infrastructure.security.filter.TenantAwareTenantIdentifierFilter

"*" needs to be replaced by a particular domain. I'll be happy if I someone could help me with the domain.

Thanks

@vorburger
Copy link
Member

@DBryzz Following #764 and #761 this will pass the build (or not at least not fail because of integration tests) if you rebase this now.

…endencies.gradle files and a maxHeapSize of 2g for spotbugs
@vorburger
Copy link
Member

@DBryzz see (new) https://github.com/apache/fineract#pull-requests and do not wait for an active maintainer to come and help you re. build failures - it's your responsibility to get a green build. Have you checked the log, and done what the README suggests to do in such cases? 😺

@thesmallstar
Copy link
Member

Hello @DBryzz can you please solve the conflicts? if this still fails due to "flaky" test please follow the readme :)

// allows for Cross-Origin
// Requests (CORs) to be performed against the platform API.
response.setHeader("Access-Control-Allow-Origin", "*");
response.setHeader("Access-Control-Allow-Origin", "https://mifos.org/mifos-x/");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super familiar with CORS, but this looks curious, to me. What does this hard-coded URL mean and do exactly? We have a dedicated JIRA re. CORS (search). Perhaps it would be best to first and separately solve that, before adding secbugs?

@github-actions
Copy link

This pull request seems to be stale. Are you still planning to work on it? We will automatically close it in 30 days.

@github-actions github-actions bot added the stale label Jun 20, 2020
@github-actions github-actions bot closed this Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants