forked from gambogi/CSHMembersPortal
-
Notifications
You must be signed in to change notification settings - Fork 47
Adding Quotes to Sidebar #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
devinmatte
wants to merge
6
commits into
ComputerScienceHouse:master
Choose a base branch
from
devinmatte:quotes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
39cbb5d
Updated Popular Icons to Collapse
devinmatte daf3626
Updating ignore and Package
devinmatte 1486227
Adding Quotes to sidebar
devinmatte 042f81d
Added Theme Color
devinmatte 9bdb2d1
Fixing URL
devinmatte 6aa64fc
Fixing Newline Issues
devinmatte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,3 +113,7 @@ webnews/ | |
webroster/ | ||
ybook2003/ | ||
yearbook/ | ||
|
||
# Ignore Config File from git | ||
data/config.json | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"quotefaultAPI": "keyherepls" | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<div class="col-md-3 col-sm-12"> | ||
<div class="panel panel-primary center"> | ||
<div class="panel-heading"> | ||
<div class="panel-title"> | ||
<strong>Quotefault!</strong> | ||
</div> | ||
</div> | ||
<div class="panel-body"> | ||
<div class="row"> | ||
<div class="row"> | ||
<div class="col-md-12 col-sm-12 col-xs-12"> | ||
<p>"{{ quote.quote }}"</p> | ||
<p>- <b>{{ quote.speaker }}</b></p> | ||
</div> | ||
<hr/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this pose a security vulnerability where I could visit https://members.csh.rit.edu/data/config.json and then read out your API information and gain access to use that API as your user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking back I think this concern could be fairly dismissed since only people who would already have quotefault access would get to this point. The only route that would really lead to any questionable activity would be adding quotes, but if that ends up being a concern a good solution may be to add read-only keys to QuotefaultAPI (although I don't think we'll get to that point).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can likely add readonly keys, but yeah in the meantime I'm not really worried about people accessing the key. Also couldn't we do something with permissions around the file to protect it? I don't really know what other way to store the key that makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you'd be trying to access the file from client-side JS you'd need to make the file readable over HTTP to authenticated clients. I think that designing a way for that file to be secure would require more effort than would be worth it for protecting a database of quotes.
If you end up adding readonly keys I think that would be the simplest way to get a secure solution (from the perspective of someone with organization-level access accessing the API and mutating data through a key that 'anonymizes' them).
I'm fine with this change if @mbillow and @stevenmirabito also agree that this concern isn't high enough priority to block adding in this feature.