Comments (5)
Hey @jcoyne, thanks for the answer!
In this case to achieve some more security I would go with just a hostname, port and path, it should be quite enough to get info about any network issue.
Unfortunately there's no built in method to clear the uri for printing, so what about just pretty straightforward "patch" with concatenating these uri parts?
Something like this:
def clean_uri(uri)
"#{uri.scheme}://#{uri.user && uri.password ? "REDACTED:REDACTED@" : ''}#{uri.hostname}#{uri.port ? ":#{uri.port}" : ''}#{uri.path}#{uri.query ? "?#{uri.query}" : ''}"
end
uri = URI.parse("http://username:[email protected]:8983/solr/admin/update?wt=json&q=test")
clean_uri(uri) # => "http://REDACTED:[email protected]:8983/solr/admin/update?wt=json&q=test"
uri = URI.parse("http://hostname.local:8983/solr/admin/update")
clean_uri(uri) # => "http://hostname.local:8983/solr/admin/update"
A bit ugly I know, but currently it's seriously compromises Solr credentials for a bunch of people when throws exception into Rollbar for example
from rsolr.
Great, I'll work on putting together a PR.
from rsolr.
@esergion how would you propose something like this is fixed?
It looks like the problem is here:
Line 16 in 0f2ce40
from rsolr.
Hello! I am running into this problem. Is there any issue with the approach described by @esergion or is it just a matter of submitting an PR? Thanks!
from rsolr.
I think we just need someone who wants to do that work.
from rsolr.
Related Issues (20)
- rsolr/xml does not import Rsolr::Field
- Validate that URI is an HTTP URI.
- retry_503 does not seem to do as the documentation describes
- Does not work with no_proxy
- Non UTF-8 encodings cause conversion error
- NameError: uninitialized constant Faraday::FlatParamsEncoder HOT 1
- gem not updated HOT 1
- Bad JSON for multi-value fields HOT 1
- Fetch all record does not include the metatdata
- softCommit? HOT 4
- FrozenError: can't modify frozen String
- Bad JSON for array atomic updates
- Support Faraday 1.0
- Enable http keepalive connections HOT 2
- RSolr::Error::Http is too generic when Faraday::Error#response is nil HOT 3
- retry_503 option does not work at all HOT 1
- better inclusion of Solr error message in exceptions HOT 7
- Problems with `retry_503` option HOT 2
- RSolr::Error::Http HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rsolr.